Interface FolderSheetResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
This interface provides methods to access sheet resources that are associated to a Folder object.
Thread Safety: Implementation of this interface must be thread safe.
public interface FolderSheetResources
Methods
CreateSheet(long, Sheet)
Creates a sheet from scratch in the specified folder.
Mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets
Sheet CreateSheet(long folderId, Sheet sheet)
Parameters
Returns
- Sheet
the created sheet
Exceptions
- InvalidOperationException
if any argument is null or an 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
CreateSheetFromTemplate(long, Sheet, IEnumerable<TemplateInclusion>?)
Creates a sheet in the specified folder, from the specified template.
Mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets
Sheet CreateSheetFromTemplate(long folderId, Sheet sheet, IEnumerable<TemplateInclusion>? includes = null)
Parameters
folderId
longthe folder Id
sheet
Sheetthe sheet to create
includes
IEnumerable<TemplateInclusion>used to specify the optional objects to include
Returns
- Sheet
the created sheet
Exceptions
- InvalidOperationException
if any argument is null or an 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
ImportCsvSheet(long, string, string?, int?, int?)
Imports a sheet in the specified folder (from CSV).
Mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import
Sheet ImportCsvSheet(long folderId, string file, string? sheetName = null, int? headerRowIndex = null, int? primaryColumnIndex = null)
Parameters
folderId
longthe folder Id
file
stringpath to the CSV file
sheetName
stringdestination sheet name
headerRowIndex
int?index (0 based) of row to be used for column names
primaryColumnIndex
int?index (0 based) of primary column
Returns
- Sheet
the created sheet
Exceptions
- InvalidOperationException
if any argument is null or an 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
ImportXlsSheet(long, string, string?, int?, int?)
Imports a sheet in the specified folder (from XLSX).
Mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import
Sheet ImportXlsSheet(long folderId, string file, string? sheetName = null, int? headerRowIndex = null, int? primaryColumnIndex = null)
Parameters
folderId
longthe folder Id
file
stringpath to the XLSX file
sheetName
stringdestination sheet name
headerRowIndex
int?index (0 based) of row to be used for column names
primaryColumnIndex
int?index (0 based) of primary column
Returns
- Sheet
the created sheet
Exceptions
- InvalidOperationException
if any argument is null or an 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