Table of Contents

Interface SheetColumnResources

Namespace
Smartsheet.Api
Assembly
smartsheet-csharp-sdk.dll

This interface provides methods to access column resources that are associated to a sheet object.

Thread Safety: Implementation of this interface must be thread safe.

public interface SheetColumnResources

Methods

AddColumns(long, IEnumerable<Column>)

Inserts one or more columns into the Sheet specified in the URL.

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/Columns

IList<Column> AddColumns(long sheetId, IEnumerable<Column> columns)

Parameters

sheetId long

the sheet Id

columns IEnumerable<Column>

the column object(s)

Returns

IList<Column>

the created column

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

DeleteColumn(long, long)

Deletes the Column specified in the URL.

It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/columns/{columnId}

void DeleteColumn(long sheetId, long columnId)

Parameters

sheetId long

the sheet Id

columnId long

the column object

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

GetColumn(long, long, IEnumerable<ColumnInclusion>?)

Gets the Column specified in the URL.

It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/columns/{columnId}

Column GetColumn(long sheetId, long columnId, IEnumerable<ColumnInclusion>? include = null)

Parameters

sheetId long

the sheet Id

columnId long

the columnId

include IEnumerable<ColumnInclusion>

elements to include in response

Returns

Column

the created column

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

ListColumns(long, IEnumerable<ColumnInclusion>?, PaginationParameters?, int?)

Gets a list of all Columns belonging to the Sheet specified in the URL.

It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/columns

This operation supports pagination of results. For more information, see Paging.
PaginatedResult<Column> ListColumns(long sheetId, IEnumerable<ColumnInclusion>? include = null, PaginationParameters? paging = null, int? level = null)

Parameters

sheetId long

the sheet Id

include IEnumerable<ColumnInclusion>

elements to include in response

paging PaginationParameters

the paging

level int?

compatibility level

Returns

PaginatedResult<Column>

the list of Columns (note that an empty list will be returned if there is none)

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

UpdateColumn(long, Column)

Updates properties of the column, moves the column, and/or renames the column.

You cannot change the type of a Primary column.

While dependencies are enabled on a sheet, you can’t change the type of any special calendar/Gantt columns.

If the column type is changed, all cells in the column will be converted to the new column type.

Type is optional when moving or renaming, but required when changing type or dropdown values.

It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/columns/{columnId}

Column UpdateColumn(long sheetId, Column column)

Parameters

sheetId long

the sheet Id

column Column

column object to update

Returns

Column

the updated column

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation