Skip to content

Sheets Worksheet Repeater

This task will loop or iterate through the sheets in a spreadsheet in Google Sheets, running the sub-tasks contained within this task for each sheet that is processed.

To add sub-tasks, drag and drop tasks from the task library onto this task. The sub-tasks are displayed as child nodes of the Sheets Row Repeater task.

Settings

Google Workspace Connection

Required
The Google Workspace connection to use. See the Connecting to Google Workspace article if you require more information on how to create/manage connections.

Include Hidden Worksheets

Required
Set to True to repeat over hidden worksheets in the spreadsheet, or False to skip them. Defaults to False.

Spreadsheet ID

Required
The ID of the spreadsheet to export. This can be found in the URL of the spreadsheet.

Zynk Settings

See Common Task Settings

Context Variables

For every sheet in the spreadsheet, the following information is available to the sub-tasks as a current variable:

  • WorksheetId - Contains the ID of the sheet.
  • WorksheetName - Contains the name of the sheet.
  • WorksheetIndex - Contains the 0 based index of the sheet.
  • WorksheetHidden - Contains a boolean value indicating whether the sheet is hidden.

The sub-tasks can access the values of these variables using razor, so they can be used in templates, or within task settings that support Zynk Objects. For example @(Context.Current["WorksheetName"]) would be used to access the name of the sheet.

See Accessing Variables in Tasks for more information on using context variables.