C# Class Smartsheet.Api.Internal.SheetResourcesImpl

This is the implementation of the SheetResources. Thread Safety: This class is thread safe because it is immutable and its base class is thread safe.
Inheritance: AbstractResources, SheetResources
Show file Open project: smartsheet-platform/smartsheet-csharp-sdk Class Usage Examples

Public Methods

Method Description
CopySheet ( long sheetId, ContainerDestination destination, IEnumerable include ) : Api.Models.Sheet

Creates a copy of the specified Sheet.

It mirrors To the following Smartsheet REST API method:
POST /sheets/{sheetId}/copy

CreateSheet ( Api.Models.Sheet sheet ) : Api.Models.Sheet

Create a sheet in default "Sheets" collection.

It mirrors To the following Smartsheet REST API method:
POST /Sheets

CreateSheetFromTemplate ( Api.Models.Sheet sheet, IEnumerable includes ) : Api.Models.Sheet

Create a sheet (from existing sheet or template) in default "Sheets" collection.

It mirrors To the following Smartsheet REST API method: POST /Sheets

DeleteSheet ( long sheetId ) : void

Create a sheet in given folder.

It mirrors To the following Smartsheet REST API method: POST /folders/{folderId}/Sheets

Create a sheet (from existing sheet or template) in given folder.

It mirrors To the following Smartsheet REST API method: POST /folders/{folderId}/Sheets

Delete a sheet.

It mirrors To the following Smartsheet REST API method: DELETE /sheets/{sheetId}

GetPublishStatus ( long sheetId ) : Api.Models.SheetPublish

Get the Status of the Publish settings of the sheet, including the URLs of any enabled publishings.

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/publish

GetSheet ( long sheetId, IEnumerable includes, IEnumerable excludes, IEnumerable rowIds, IEnumerable rowNumbers, IEnumerable columnIds, long pageSize, long page ) : Api.Models.Sheet

Get a sheet.

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

GetSheetAsCSV ( long sheetId, BinaryWriter outputStream ) : void

Get a sheet as a CSV file.

It mirrors To the following Smartsheet REST API method:
GET /sheets/{sheetId} with "text/csv" Accept HTTP header

GetSheetAsExcel ( long sheetId, BinaryWriter outputStream ) : void

Get a sheet as an Excel file.

It mirrors To the following Smartsheet REST API method:
GET /sheets/{sheetId} with "application/vnd.ms-excel" Accept HTTP header

GetSheetAsPDF ( long sheetId, BinaryWriter outputStream, Api.Models.PaperSize paperSize ) : void

Get a sheet as a PDF file.

It mirrors To the following Smartsheet REST API method:
GET /sheets/{sheetId} with "application/pdf" Accept HTTP header

GetSheetVersion ( long sheetId ) : int?

Gets the Sheet version without loading the entire Sheet.

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/version

ListOrganizationSheets ( PaginationParameters paging ) : PaginatedResult

List all Sheets in the organization.

It mirrors To the following Smartsheet REST API method: GET /users/sheets

ListSheets ( IEnumerable includes, PaginationParameters paging, System.DateTime modifiedSince ) : PaginatedResult

Gets the list of all Sheets that the User has access to, in alphabetical order, by name.

It mirrors To the following Smartsheet REST API method: GET /Sheets

MoveSheet ( long sheetId, ContainerDestination destination ) : Api.Models.Sheet

Moves the specified sheet to a new location.

It mirrors To the following Smartsheet REST API method:
POST /sheets/{sheetId}/move

SendSheet ( long sheetId, Api.Models.SheetEmail email ) : void

Send a sheet as a PDF attachment via Email To the designated recipients.

It mirrors To the following Smartsheet REST API method: POST /sheets/{sheetId}/emails

SendUpdateRequest ( long sheetId, MultiRowEmail email ) : UpdateRequest

Creates an Update Request for the specified Row(s) within the Sheet. An email notification (containing a link to the update request) will be asynchronously sent to the specified recipient(s).

It mirrors To the following Smartsheet REST API method: POST /sheets/{sheetId}/updaterequests

SheetResourcesImpl ( SmartsheetImpl smartsheet ) : System

Constructor. Exceptions: - IllegalArgumentException : if any argument is null

UpdatePublishStatus ( long id, Api.Models.SheetPublish publish ) : Api.Models.SheetPublish

Sets the publish Status of a sheet and returns the new Status, including the URLs of any enabled publishings.

It mirrors To the following Smartsheet REST API method: PUT /sheets/{sheetId}/publish

UpdateSheet ( Api.Models.Sheet sheet ) : Api.Models.Sheet

Update a sheet.

To modify Sheet contents, see Add Row(s), Update Row(s), and Update Column.

This operation can be used to update an individual user’s sheet settings. If the request body contains only the userSettings attribute, this operation may be performed even if the user only has read-only access to the sheet (i.e. the user has viewer permissions, or the sheet is read-only).

It mirrors To the following Smartsheet REST API method: PUT /sheets/{sheetId}

Private Methods

Method Description
CopyStream ( Stream input, Stream output ) : void

Copy stream.

GetSheetAsFile ( long sheetId, Api.Models.PaperSize paperSize, BinaryWriter outputStream, string contentType ) : void

Get a sheet as a file.

It mirrors To the following Smartsheet REST API method:
GET /sheets/{sheetId} with "application/pdf", "application/vnd.ms-excel", or "text/csv" as Accept HTTP header

Method Details

CopySheet() public method

Creates a copy of the specified Sheet.

It mirrors To the following Smartsheet REST API method:
POST /sheets/{sheetId}/copy

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public CopySheet ( long sheetId, ContainerDestination destination, IEnumerable include ) : Api.Models.Sheet
sheetId long the sheet Id
destination Smartsheet.Api.Models.ContainerDestination the destination to copy to
include IEnumerable the elements to copy. Note: Cell history will not be copied, regardless of which include parameter values are specified.
return Api.Models.Sheet

CreateSheet() public method

Create a sheet in default "Sheets" collection.

It mirrors To the following Smartsheet REST API method:
POST /Sheets

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public CreateSheet ( Api.Models.Sheet sheet ) : Api.Models.Sheet
sheet Api.Models.Sheet the sheet To created
return Api.Models.Sheet

CreateSheetFromTemplate() public method

Create a sheet (from existing sheet or template) in default "Sheets" collection.

It mirrors To the following Smartsheet REST API method: POST /Sheets

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public CreateSheetFromTemplate ( Api.Models.Sheet sheet, IEnumerable includes ) : Api.Models.Sheet
sheet Api.Models.Sheet the sheet To create
includes IEnumerable used To specify the optional objects To include.
return Api.Models.Sheet

DeleteSheet() public method

Create a sheet in given folder.

It mirrors To the following Smartsheet REST API method: POST /folders/{folderId}/Sheets

Create a sheet (from existing sheet or template) in given folder.

It mirrors To the following Smartsheet REST API method: POST /folders/{folderId}/Sheets

Delete a sheet.

It mirrors To the following Smartsheet REST API method: DELETE /sheets/{sheetId}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public DeleteSheet ( long sheetId ) : void
sheetId long the sheetId
return void

GetPublishStatus() public method

Get the Status of the Publish settings of the sheet, including the URLs of any enabled publishings.

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/publish

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if there is any other error during the operation
public GetPublishStatus ( long sheetId ) : Api.Models.SheetPublish
sheetId long the sheetId
return Api.Models.SheetPublish

GetSheet() public method

Get a sheet.

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

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetSheet ( long sheetId, IEnumerable includes, IEnumerable excludes, IEnumerable rowIds, IEnumerable rowNumbers, IEnumerable columnIds, long pageSize, long page ) : Api.Models.Sheet
sheetId long the Id of the sheet
includes IEnumerable used To specify the optional objects To include.
excludes IEnumerable used To specify the optional objects To include.
rowIds IEnumerable used To specify the optional objects To include.
rowNumbers IEnumerable used To specify the optional objects To include.
columnIds IEnumerable used To specify the optional objects To include.
pageSize long used To specify the optional objects To include.
page long used To specify the optional objects To include.
return Api.Models.Sheet

GetSheetAsCSV() public method

Get a sheet as a CSV file.

It mirrors To the following Smartsheet REST API method:
GET /sheets/{sheetId} with "text/csv" Accept HTTP header

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetSheetAsCSV ( long sheetId, BinaryWriter outputStream ) : void
sheetId long the Id of the sheet
outputStream System.IO.BinaryWriter the output stream To which the CSV file will be written.
return void

GetSheetAsExcel() public method

Get a sheet as an Excel file.

It mirrors To the following Smartsheet REST API method:
GET /sheets/{sheetId} with "application/vnd.ms-excel" Accept HTTP header

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetSheetAsExcel ( long sheetId, BinaryWriter outputStream ) : void
sheetId long the Id of the sheet
outputStream System.IO.BinaryWriter the output stream To which the Excel file will be written.
return void

GetSheetAsPDF() public method

Get a sheet as a PDF file.

It mirrors To the following Smartsheet REST API method:
GET /sheets/{sheetId} with "application/pdf" Accept HTTP header

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetSheetAsPDF ( long sheetId, BinaryWriter outputStream, Api.Models.PaperSize paperSize ) : void
sheetId long the Id of the sheet
outputStream System.IO.BinaryWriter the output stream To which the PDF file will be written.
paperSize Api.Models.PaperSize the paper size
return void

GetSheetVersion() public method

Gets the Sheet version without loading the entire Sheet.

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/version

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetSheetVersion ( long sheetId ) : int?
sheetId long the sheetId
return int?

ListOrganizationSheets() public method

List all Sheets in the organization.

It mirrors To the following Smartsheet REST API method: GET /users/sheets

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public ListOrganizationSheets ( PaginationParameters paging ) : PaginatedResult
paging Smartsheet.Api.Models.PaginationParameters
return PaginatedResult

ListSheets() public method

Gets the list of all Sheets that the User has access to, in alphabetical order, by name.

It mirrors To the following Smartsheet REST API method: GET /Sheets

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public ListSheets ( IEnumerable includes, PaginationParameters paging, System.DateTime modifiedSince ) : PaginatedResult
includes IEnumerable
paging Smartsheet.Api.Models.PaginationParameters
modifiedSince System.DateTime
return PaginatedResult

MoveSheet() public method

Moves the specified sheet to a new location.

It mirrors To the following Smartsheet REST API method:
POST /sheets/{sheetId}/move

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public MoveSheet ( long sheetId, ContainerDestination destination ) : Api.Models.Sheet
sheetId long the sheet Id
destination Smartsheet.Api.Models.ContainerDestination the destination to copy to
return Api.Models.Sheet

SendSheet() public method

Send a sheet as a PDF attachment via Email To the designated recipients.

It mirrors To the following Smartsheet REST API method: POST /sheets/{sheetId}/emails

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public SendSheet ( long sheetId, Api.Models.SheetEmail email ) : void
sheetId long the sheetId
email Api.Models.SheetEmail the Email
return void

SendUpdateRequest() public method

Creates an Update Request for the specified Row(s) within the Sheet. An email notification (containing a link to the update request) will be asynchronously sent to the specified recipient(s).

It mirrors To the following Smartsheet REST API method: POST /sheets/{sheetId}/updaterequests

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public SendUpdateRequest ( long sheetId, MultiRowEmail email ) : UpdateRequest
sheetId long the sheetId
email Smartsheet.Api.Models.MultiRowEmail the Email
return Smartsheet.Api.Models.UpdateRequest

SheetResourcesImpl() public method

Constructor. Exceptions: - IllegalArgumentException : if any argument is null
public SheetResourcesImpl ( SmartsheetImpl smartsheet ) : System
smartsheet SmartsheetImpl the Smartsheet
return System

UpdatePublishStatus() public method

Sets the publish Status of a sheet and returns the new Status, including the URLs of any enabled publishings.

It mirrors To the following Smartsheet REST API method: PUT /sheets/{sheetId}/publish

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public UpdatePublishStatus ( long id, Api.Models.SheetPublish publish ) : Api.Models.SheetPublish
id long the sheetId
publish Api.Models.SheetPublish the SheetPublish object limited.
return Api.Models.SheetPublish

UpdateSheet() public method

Update a sheet.

To modify Sheet contents, see Add Row(s), Update Row(s), and Update Column.

This operation can be used to update an individual user’s sheet settings. If the request body contains only the userSettings attribute, this operation may be performed even if the user only has read-only access to the sheet (i.e. the user has viewer permissions, or the sheet is read-only).

It mirrors To the following Smartsheet REST API method: PUT /sheets/{sheetId}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public UpdateSheet ( Api.Models.Sheet sheet ) : Api.Models.Sheet
sheet Api.Models.Sheet the sheet To update
return Api.Models.Sheet