CreateSheet
Creates a new sheet in Smartsheet for data organization and tracking.
Stored Procedure-Specific Information
This procedure uses indexed parameters. Indexed parameters let you provide multiple values for the same input by adding #1, #2, #3, and so forth, to the parameter name.Besides the required parameters mentioned below, you must specify the ColumnName# and the ColumnType# (and optionally the PrimaryColumn#) input parameters for each column added. Additionally, you must specify either the WorkspaceId or the FolderId input parameters. Lastly, you must provide at least one primary column in order to create a new sheet. Not meeting any of these conditions will cause the procedure to fail.
Refer to the query example below:
EXEC CreateSheet SheetName = 'TestSheet', ColumnName#1 = 'Id', ColumnType#1 = 'TEXT_NUMBER', PrimaryColumn#1 = true, ColumnName#2 = 'Column1', ColumnType#2 = 'TEXT_NUMBER', PrimaryColumn#2 = false
In the Input table below, indexed parameters are denoted with a '#' character at the end of their names.
Input
| Name | Type | Required | Description |
| SheetName | String | True | The name of the new sheet to be created. This should be a unique, user-friendly identifier for the sheet. |
| ColumnName# | String | False | The name of the column to be added to the sheet. Use descriptive names for clarity. DEPRECATED, to be removed in the next major release. |
| ColumnType# | String | False | The data type of the column values, such as TEXT_NUMBER or CHECKBOX, which defines how the column data is stored and validated. DEPRECATED, to be removed in the next major release. |
| PrimaryColumn# | String | False | Specifies whether this column is the primary column, which typically serves as the main identifier for rows in the sheet. Set this value to 'true' for the primary column, 'false' otherwise. DEPRECATED, to be removed in the next major release. |
| WorkspaceId | String | False | The unique identifier of the workspace (root) in which the new sheet will be located. |
| FolderId | String | False | The unique identifier of the folder in which the new sheet will be located. |
Result Set Columns
| Name | Type | Description |
| Success | String | A boolean or status flag indicating if the sheet creation operation was successful. |
| Id | String | The unique identifier of the sheet created. |