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.
TASK_CONCAT(output_doc_name, output_textfile_name, ranges)
Parameter | Data Type | Required | Description |
---|---|---|---|
output_doc_name |
|
Optional | The name for the Google Doc to be created. Leave empty if no Doc is needed. |
output_textfile_name |
|
Optional | The name for the text file to be created. Leave empty if no text file is required. |
ranges |
|
Required | A semicolon-separated list of cell ranges in A1 notation (e.g.,
|
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.
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.
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.
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.
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.
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.
Ensure that your parameters are properly formatted with quotes for text and commas separating the values.
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.
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.
Reducing the number of ranges or the size of the files being concatenated can improve processing time.
No. You can provide one or the other. Leave the unused parameter empty if you do not wish to create that type of output.
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).
Ensure that you have supplied at least one non-empty output name and review any error messages shown in the cell with the function.
Yes, dynamic cell references or formulas can be used for ranges, provided the final concatenated string adheres to valid A1 notation.
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.
3 weeks ago