TASK_CONCAT

Knowledgebase

TASK_CONCAT

Function Overview

TASK_CONCAT is a custom function within Sheet Workflows that lets you easily โ€œglueโ€ together text from multiple ranges in your spreadsheet. It combines cell content with text retrieved from hyperlinks (such as Google Docs) to create one merged output that can be saved as a new Google Doc or text file in Google Drive.

Uses

  1. Compile reports by merging notes, summaries, or data fragments from various spreadsheet areas.
  2. Build documentation by automatically pulling together related texts and linked file content.
  3. Collect feedback by consolidating survey responses from different cell ranges into one file.
  4. Archive data by combining scattered pieces of text into a searchable document.

Syntax and Parameters

TASK_CONCAT(output_doc_name, output_textfile_name, ranges)

Parameter Data Type Required Description
output_doc_name

string

Optional The name for the Google Doc to be created. Leave empty if no Doc is needed.
output_textfile_name

string

Optional The name for the text file to be created. Leave empty if no text file is required.
ranges

string

Required A semicolon-separated list of cell ranges in A1 notation (e.g.,

"A1:B5; D10:D15; F2:F2"

) containing the text.

Advanced Options

Dual Output Options

If a name is specified for output_doc_name, the merged content is placed in a new Google Doc. Similarly, if output_textfile_name is provided, the result is also saved as a text file. You can provide both names to generate and hyperlink both outputs in your sheet.

Range Flexibility

You can list multiple ranges using a semicolon. Each range should be in valid A1 notation, and extra spaces after semicolons are automatically trimmed. Ranges from different parts of your sheet are supported.

If a cell contains a hyperlink to a file (such as a Google Doc), the function attempts to automatically extract that fileโ€™s text content and append it to the merged output. Ensure that the linked files have sharing settings that allow access via the link.

Error Handling and Messages

Upon completion, TASK_CONCAT returns a status message with a link to the generated file(s). Errorsโ€”such as invalid ranges or missing parametersโ€”are reported to help troubleshoot issues.

Examples

Example 1: Create a Google Doc Report

Merge content from ranges A1:B10 and C1:C10 into a new Google Doc named "My Report".

=TASK_CONCAT("My Report", "", "A1:B10; C1:C10")

A hyperlink to the new Google Doc appears in the adjacent cell.

Example 2: Generate a Text File

Output the merged content as a plain text file named "output.txt" using range D1:D20.

=TASK_CONCAT("", "output.txt", "D1:D20")

A link to the text file is created next to the function cell.

Example 3: Dual Output (Doc and Text File)

Generate both a Google Doc and a text file from ranges A1:A5 and B1:B3.

=TASK_CONCAT("Combined Document", "combined.txt", "A1:A5; B1:B3")

Both results are linked in your spreadsheet after execution.

Best Practices

  • Verify your ranges to ensure they use valid A1 notation and include the desired cells.
  • Confirm that any linked files are shared with โ€œAnyone with the linkโ€ so their content can be extracted.
  • Use descriptive file names (e.g., "Monthly Summary" or "Feedback_Archive.txt") for easy identification.
  • Limit the number of ranges provided to enhance performance during processing.
  • Test the function with a small dataset before scaling up to larger volumes of data.

Troubleshooting

Invalid Input Error

Ensure that your parameters are properly formatted with quotes for text and commas separating the values.

No Output File Created

If neither output_doc_name nor output_textfile_name is provided, no file will be generated. Supply at least one output parameter to see a result.

Incorrect Range(s)

Check that all specified ranges follow A1 notation accurately and exist on the active sheet.

Verify that any linked fileโ€™s sharing settings allow access and that the URL is correct.

Slow Processing

Reducing the number of ranges or the size of the files being concatenated can improve processing time.

FAQ

Do I need to specify both output_doc_name and output_textfile_name?

No. You can provide one or the other. Leave the unused parameter empty if you do not wish to create that type of output.

How should I separate multiple ranges?

List all ranges as a single string separated by semicolons (e.g.,

"A1:B10; C1:C10"

).

The function automatically checks for hyperlinks and, if detected, extracts the text from the linked file (if accessible).

Why isnโ€™t my output file showing up?

Ensure that you have supplied at least one non-empty output name and review any error messages shown in the cell with the function.

Can I use TASK_CONCAT with dynamic ranges?

Yes, dynamic cell references or formulas can be used for ranges, provided the final concatenated string adheres to valid A1 notation.

Summary

TASK_CONCAT is a powerful tool in Sheet Workflows for combining and extracting text from multiple parts of your spreadsheet, including content from externally linked files. By following the guidelines and best practices outlined above, you can efficiently automate report compilation and content consolidation without writing any code.

Elisha

3 weeks ago

Categories
Features