The TASK_CONCAT function combines content from multiple cell ranges, extracting text from cells and linked files, and optionally saves the concatenated result to a Google Doc or text file. It's especially useful for merging content from scattered spreadsheet data and Google Drive files.
=TASK_CONCAT(header, [output_doc_name], [output_textfile_name], ranges)
Parameter | Data Type | Required | Description |
---|---|---|---|
header | string | Yes | Column header for the task template |
output_doc_name | string | No | Name for the output Google Doc; if omitted, no Google Doc will be created |
output_textfile_name | string | No | Name for the output text file; if omitted, no text file will be created |
ranges | string | Yes | Semicolon-separated list of cell ranges in A1 notation (e.g., "A1:B5;C1:C10") |
When TASK_CONCAT encounters a cell containing a hyperlink to a Google Doc or text file, it automatically fetches and uses the content of that file rather than the visible cell text. This allows you to reference external documents without manually copying their content.
You can choose to:
output_doc_name
but not output_textfile_name
output_textfile_name
but not output_doc_name
Output files are stored in your Google Drive under the default Sheet Workflows folder. After creation, a hyperlink to each file appears in the cell to the right of the TASK_CONCAT formula.
You can reference ranges from different sheets by including the sheet name in the range notation:
=TASK_CONCAT("Header", "CombinedReport", "", "Sheet1!A1:A5;Sheet2!B1:B5")
=TASK_CONCAT("Header", "ProjectSummary", "", "A1:A10")
=TASK_CONCAT("Header", "ComprehensiveReport", "", "D5:D8")
=TASK_CONCAT("Header", "MeetingNotes", "meeting_notes.txt", "Notes!B2:B20;Actions!C5:C15")
=TASK_CONCAT("Header", "", "", "A1:B5;C1:C10")
=TASK_CONCAT("Header", "QuarterlyReport", "", "Q1Data!A1:A10;Q2Data!A1:A10;Q3Data!A1:A10")
Cause: The ranges parameter is empty or only contains whitespace.
Solution: Provide at least one valid cell range in A1 notation (e.g., "A1:B5").
Cause: The function parameter in the JSON doesn't match "TASKCONCAT".
Solution: Ensure you're using the correct TASK* function and that the JSON hasn't been manually altered.
Cause: There was an issue creating the Google Doc, possibly due to permissions or invalid characters.
Solution: Check that you have permission to create files in Drive and that the output_doc_name doesn't contain invalid characters.
Cause: There was a problem creating the text file in Drive.
Solution: Verify that you have sufficient Drive permissions and that the output_textfile_name is valid.
Cause: The formula's output is static once generated.
Solution: After making changes to source cells, you need to run the TASK_CONCAT formula again by clicking "Run" in the Sheet Workflows sidebar.
Cause: The hyperlinks might be incorrectly formatted or point to files you don't have access to.
Solution: Ensure hyperlinks are valid Google Drive URLs and that you have access to the files they point to.
TASK_CONCAT extracts plain text content from cells. For Google Docs, it preserves some basic formatting by converting the Doc to Markdown format. Complex formatting may not be fully preserved.
No, output files are automatically saved in the default Sheet Workflows folder in your Google Drive. However, you can move them after creation.
Hyperlinks to the created files appear in the cell to the right of the TASK_CONCAT formula after running it. Click these links to open the files.
The function works best with text content. Non-text cell values will be converted to strings. Images and other non-text content from linked documents won't be included in the concatenated output.
While there's no hard limit imposed by TASK_CONCAT itself, Google Docs has a size limit of approximately 1.02 million characters. If your concatenated content exceeds this, use the text file output option instead.
Ranges are processed in the order they appear in the parameter. Within each range, cells are processed from top to bottom, left to right.
No, TASK_CONCAT only extracts and concatenates cell content as plain text. Cell formatting is not preserved.
Yes, TASK_CONCAT will process all cells in the specified ranges, regardless of whether they are filtered or hidden in the sheet view.
Empty cells are included as empty strings in the concatenation.
Two newline characters are inserted between the content of each cell, creating a blank line between entries in the output.
Yes, as long as you have permission to view the content of the protected ranges, TASK_CONCAT can extract and concatenate their content.
Yes, TASK_CONCAT will use the calculated result of any formula in the cells within the specified ranges.
1 week ago