Interface SheetResources
-
public interface SheetResources
This interface provides methods to access Sheet resources.
Thread Safety: Implementation of this interface must be thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description SheetAttachmentResources
attachmentResources()
Return the AttachmentResources object that provides access to attachment resources associated with Sheet resources.SheetAutomationRuleResources
automationRuleResources()
Return the SheetAutomationRuleResources object that provides access to automation rule resources associated with Sheet resources.SheetColumnResources
columnResources()
Return the SheetColumnResources object that provides access to Column resources associated with Sheet resources.SheetCommentResources
commentResources()
Return the SheetCommentResources object that provides access to discussion resources associated with Sheet resources.Sheet
copySheet(long sheetId, ContainerDestination containerDestination, java.util.EnumSet<SheetCopyInclusion> includes)
Creates a copy of the specified sheet.Sheet
copySheet(long sheetId, ContainerDestination containerDestination, java.util.EnumSet<SheetCopyInclusion> includes, java.util.EnumSet<CopyExclusion> excludes)
Creates a copy of the specified sheet.Sheet
createSheet(Sheet sheet)
Create a sheet in default "Sheets" collection.Sheet
createSheetFromTemplate(Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes)
Create a sheet (from existing sheet or template) in default "Sheets" collection.Sheet
createSheetInFolder(long folderId, Sheet sheet)
Create a sheet in given folder.Sheet
createSheetInFolderFromTemplate(long folderID, Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes)
Create a sheet (from existing sheet or template) in given folder.Sheet
createSheetInWorkspace(long workspaceId, Sheet sheet)
Create a sheet in given workspace.Sheet
createSheetInWorkspaceFromTemplate(long workspaceId, Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes)
Create a sheet (from existing sheet or template) in given workspace.UpdateRequest
createUpdateRequest(long sheetId, MultiRowEmail email)
Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.SheetCrossSheetReferenceResources
crossSheetReferenceResources()
Return the CrossSheetReferenceResources object that provides access to cross sheet reference resources associated with Sheet resources.void
deleteSheet(long id)
Delete a sheet.SheetDiscussionResources
discussionResources()
Return the SheetDiscussionResources object that provides access to discussion resources associated with Sheet resources.SheetFilterResources
filterResources()
Return the SheetFilterResources object that provides access to sheet filter resources associated with Sheet resources.SheetPublish
getPublishStatus(long id)
Get the status of the Publish settings of the sheet, including the URLs of any enabled publishings.Sheet
getSheet(long sheetId)
Get sheet by ID.Sheet
getSheet(long id, java.util.EnumSet<SheetInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes, java.util.Set<java.lang.Long> rowIds, java.util.Set<java.lang.Integer> rowNumbers, java.util.Set<java.lang.Long> columnIds, java.lang.Integer pageSize, java.lang.Integer page)
Get a sheet.Sheet
getSheet(long id, java.util.EnumSet<SheetInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes, java.util.Set<java.lang.Long> rowIds, java.util.Set<java.lang.Integer> rowNumbers, java.util.Set<java.lang.Long> columnIds, java.lang.Integer pageSize, java.lang.Integer page, java.lang.Integer ifVersionAfter)
Get a sheet.Sheet
getSheet(long id, java.util.EnumSet<SheetInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes, java.util.Set<java.lang.Long> rowIds, java.util.Set<java.lang.Integer> rowNumbers, java.util.Set<java.lang.Long> columnIds, java.lang.Integer pageSize, java.lang.Integer page, java.lang.Integer ifVersionAfter, java.lang.Integer level)
Get a sheet.void
getSheetAsCSV(long id, java.io.OutputStream outputStream)
Get a sheet as an Excel file.void
getSheetAsExcel(long id, java.io.OutputStream outputStream)
Get a sheet as an Excel file.void
getSheetAsPDF(long id, java.io.OutputStream outputStream, PaperSize paperSize)
Get a sheet as a PDF file.int
getSheetVersion(long id)
Get a sheet version.Sheet
importCsv(java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)
Imports a sheet.Sheet
importCsvInFolder(long folderID, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)
Imports a sheet in given folder.Sheet
importCsvInWorkspace(long workspaceId, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)
Imports a sheet in given workspace.Sheet
importXlsx(java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)
Imports a sheet.Sheet
importXlsxInFolder(long folderId, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)
Imports a sheet in given folder.Sheet
importXlsxInWorkspace(long workspaceId, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)
Imports a sheet in given workspace.PagedResult<Sheet>
listOrganizationSheets(PaginationParameters parameters)
Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.PagedResult<Sheet>
listSheets()
List all sheets.PagedResult<Sheet>
listSheets(java.util.EnumSet<SourceInclusion> includes, PaginationParameters pagination)
List all sheets.PagedResult<Sheet>
listSheets(java.util.EnumSet<SourceInclusion> includes, PaginationParameters pagination, java.util.Date modifiedSince)
List all sheets.Sheet
moveSheet(long sheetId, ContainerDestination containerDestination)
Moves the specified Sheet to another location.SheetRowResources
rowResources()
Return the SheetRowResources object that provides access to Row resources associated with Sheet resources.void
sendSheet(long id, SheetEmail email)
Send a sheet as a PDF attachment via email to the designated recipients.ShareResources
shareResources()
Return the ShareResources object that provides access to Share resources associated with Sheet resources.Sheet
sortSheet(long sheetId, SortSpecifier sortSpecifier)
Sort a sheet according to the sort criteria.Sheet
sortSheet(long sheetId, SortSpecifier sortSpecifier, java.lang.Integer level)
Sort a sheet according to the sort criteria.SheetSummaryResources
summaryResources()
Return the SheetSummaryResources object that provides access to the sheet summary resources associated with the Sheet resources.SheetPublish
updatePublishStatus(long id, SheetPublish publish)
Sets the publish status of a sheet and returns the new status, including the URLs of any enabled publishings.SheetUpdateRequestResources
updateRequestResources()
Return the SheetUpdateRequestResources object that provides access to update request resources associated with Sheet resources.Sheet
updateSheet(Sheet sheet)
Update a sheet.
-
-
-
Method Detail
-
listSheets
PagedResult<Sheet> listSheets() throws SmartsheetException
List all sheets.It mirrors to the following Smartsheet REST API method: GET /sheets
- Returns:
- A list of all sheets (note that an empty list will be returned if there are none).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
listSheets
PagedResult<Sheet> listSheets(java.util.EnumSet<SourceInclusion> includes, PaginationParameters pagination, java.util.Date modifiedSince) throws SmartsheetException
List all sheets.
It mirrors to the following Smartsheet REST API method: GET /sheets
- Parameters:
includes
- the source inclusionpagination
- the object containing the pagination parametersmodifiedSince
- restrict results to sheets modified on or after this date- Returns:
- A list of all sheets (note that an empty list will be returned if there are none).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
listSheets
PagedResult<Sheet> listSheets(java.util.EnumSet<SourceInclusion> includes, PaginationParameters pagination) throws SmartsheetException
List all sheets.
It mirrors to the following Smartsheet REST API method: GET /sheets
- Parameters:
includes
- the source inclusionpagination
- the object containing the pagination parameters- Returns:
- A list of all sheets (note that an empty list will be returned if there are none).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
listOrganizationSheets
@Deprecated(since="2.0.0", forRemoval=true) PagedResult<Sheet> listOrganizationSheets(PaginationParameters parameters) throws SmartsheetException
Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useUserResources
insteadList all sheets in the organization.
It mirrors to the following Smartsheet REST API method: GET /users/sheets
- Parameters:
parameters
- the object containing the pagination parameters- Returns:
- the list of all sheets (note that an empty list will be returned if there are none)
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getSheet
Sheet getSheet(long id, java.util.EnumSet<SheetInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes, java.util.Set<java.lang.Long> rowIds, java.util.Set<java.lang.Integer> rowNumbers, java.util.Set<java.lang.Long> columnIds, java.lang.Integer pageSize, java.lang.Integer page) throws SmartsheetException
Get a sheet.
It mirrors to the following Smartsheet REST API method: GET /sheet/{id}
- Parameters:
id
- the id of the sheetincludes
- used to specify the optional objects to include.columnIds
- the column idsexcludes
- the exclude parameterspage
- the page numberpageSize
- the page sizerowIds
- the row idsrowNumbers
- the row numbers- Returns:
- the sheet resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getSheet
Sheet getSheet(long id, java.util.EnumSet<SheetInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes, java.util.Set<java.lang.Long> rowIds, java.util.Set<java.lang.Integer> rowNumbers, java.util.Set<java.lang.Long> columnIds, java.lang.Integer pageSize, java.lang.Integer page, java.lang.Integer ifVersionAfter) throws SmartsheetException
Get a sheet.
It mirrors to the following Smartsheet REST API method: GET /sheet/{id}
- Parameters:
id
- the id of the sheetincludes
- used to specify the optional objects to include.columnIds
- the column idsexcludes
- the exclude parameterspage
- the page numberpageSize
- the page sizerowIds
- the row idsrowNumbers
- the row numbersifVersionAfter
- only fetch Sheet if more recent version available- Returns:
- the sheet resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getSheet
Sheet getSheet(long id, java.util.EnumSet<SheetInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes, java.util.Set<java.lang.Long> rowIds, java.util.Set<java.lang.Integer> rowNumbers, java.util.Set<java.lang.Long> columnIds, java.lang.Integer pageSize, java.lang.Integer page, java.lang.Integer ifVersionAfter, java.lang.Integer level) throws SmartsheetException
Get a sheet.
It mirrors to the following Smartsheet REST API method: GET /sheet/{id}
- Parameters:
id
- the id of the sheetincludes
- used to specify the optional objects to include.columnIds
- the column idsexcludes
- the exclude parameterspage
- the page numberpageSize
- the page sizerowIds
- the row idsrowNumbers
- the row numbersifVersionAfter
- only fetch Sheet if more recent version availablelevel
- compatibility level- Returns:
- the sheet resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getSheet
Sheet getSheet(long sheetId) throws SmartsheetException
Get sheet by ID. Load all row and column data
- Parameters:
sheetId
- id of the sheet to fetch- Returns:
- the sheet resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getSheetAsExcel
void getSheetAsExcel(long id, java.io.OutputStream outputStream) throws SmartsheetException
Get a sheet as an Excel file.
It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/vnd.ms-excel" Accept HTTP header
- Parameters:
id
- the id of the sheetoutputStream
- the output stream to which the Excel file will be written.- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getSheetAsCSV
void getSheetAsCSV(long id, java.io.OutputStream outputStream) throws SmartsheetException
Get a sheet as an Excel file.
It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/vnd.ms-excel" Accept HTTP header
- Parameters:
id
- the id of the sheetoutputStream
- the output stream to which the Excel file will be written.- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getSheetAsPDF
void getSheetAsPDF(long id, java.io.OutputStream outputStream, PaperSize paperSize) throws SmartsheetException
Get a sheet as a PDF file.
It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/pdf" Accept HTTP header
- Parameters:
id
- the id of the sheetoutputStream
- the output stream to which the PDF file will be written.paperSize
- the paper size- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
createSheet
Sheet createSheet(Sheet sheet) throws SmartsheetException
Create a sheet in default "Sheets" collection.
It mirrors to the following Smartsheet REST API method: POST /sheets
- Parameters:
sheet
- the sheet to created- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
createSheetFromTemplate
Sheet createSheetFromTemplate(Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes) throws SmartsheetException
Create a sheet (from existing sheet or template) in default "Sheets" collection.
It mirrors to the following Smartsheet REST API method: POST /sheets
- Parameters:
sheet
- the sheet to createincludes
- used to specify the optional objects to include.- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
importCsv
Sheet importCsv(java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex) throws SmartsheetException
Imports a sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/import
- Parameters:
file
- path to the CSV filesheetName
- destination sheet nameheaderRowIndex
- index (0 based) of row to be used for column namesprimaryColumnIndex
- index (0 based) of primary column- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
importXlsx
Sheet importXlsx(java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex) throws SmartsheetException
Imports a sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/import
- Parameters:
file
- path to the XLSX filesheetName
- destination sheet nameheaderRowIndex
- index (0 based) of row to be used for column namesprimaryColumnIndex
- index (0 based) of primary column- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
createSheetInFolder
Sheet createSheetInFolder(long folderId, Sheet sheet) throws SmartsheetException
Create a sheet in given folder.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets
- Parameters:
folderId
- the folder idsheet
- the sheet to create- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
createSheetInFolderFromTemplate
Sheet createSheetInFolderFromTemplate(long folderID, Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes) throws SmartsheetException
Create a sheet (from existing sheet or template) in given folder.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets
- Parameters:
folderID
- the folder idsheet
- the sheet to createincludes
- used to specify the optional objects to include.- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
importCsvInFolder
Sheet importCsvInFolder(long folderID, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex) throws SmartsheetException
Imports a sheet in given folder.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import
- Parameters:
folderID
- the folder idfile
- path to the CSV filesheetName
- destination sheet nameheaderRowIndex
- index (0 based) of row to be used for column namesprimaryColumnIndex
- index (0 based) of primary column- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
importXlsxInFolder
Sheet importXlsxInFolder(long folderId, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex) throws SmartsheetException
Imports a sheet in given folder.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import
- Parameters:
folderId
- the folder idfile
- path to the XLSX filesheetName
- destination sheet nameheaderRowIndex
- index (0 based) of row to be used for column namesprimaryColumnIndex
- index (0 based) of primary column- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
createSheetInWorkspace
Sheet createSheetInWorkspace(long workspaceId, Sheet sheet) throws SmartsheetException
Create a sheet in given workspace.
It mirrors to the following Smartsheet REST API method: POST /workspace/{workspaceId}/sheets
- Parameters:
workspaceId
- the workspace idsheet
- the sheet to create- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
createSheetInWorkspaceFromTemplate
Sheet createSheetInWorkspaceFromTemplate(long workspaceId, Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes) throws SmartsheetException
Create a sheet (from existing sheet or template) in given workspace.
It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets
- Parameters:
workspaceId
- the workspace idsheet
- the sheet to createincludes
- used to specify the optional objects to include- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
importCsvInWorkspace
Sheet importCsvInWorkspace(long workspaceId, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex) throws SmartsheetException
Imports a sheet in given workspace.
It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import
- Parameters:
workspaceId
- the workspace idfile
- path to the CSV filesheetName
- destination sheet nameheaderRowIndex
- index (0 based) of row to be used for column namesprimaryColumnIndex
- index (0 based) of primary column- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
importXlsxInWorkspace
Sheet importXlsxInWorkspace(long workspaceId, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex) throws SmartsheetException
Imports a sheet in given workspace.
It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import
- Parameters:
workspaceId
- the workspace idfile
- path to the XLSX filesheetName
- destination sheet nameheaderRowIndex
- index (0 based) of row to be used for column namesprimaryColumnIndex
- index (0 based) of primary column- Returns:
- the created sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
deleteSheet
void deleteSheet(long id) throws SmartsheetException
Delete a sheet.
It mirrors to the following Smartsheet REST API method: DELETE /sheet{id}
Parameters: - id : the ID of the sheet
Returns: None
- Parameters:
id
- the id- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
updateSheet
Sheet updateSheet(Sheet sheet) throws SmartsheetException
Update a sheet.
It mirrors to the following Smartsheet REST API method: PUT /sheet/{id}
- Parameters:
sheet
- the sheet to update- Returns:
- the updated sheet
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getSheetVersion
int getSheetVersion(long id) throws SmartsheetException
Get a sheet version.
It mirrors to the following Smartsheet REST API method: GET /sheet/{id}/version
- Parameters:
id
- the id- Returns:
- the sheet version (note that if there is no such resource, this method will throw ResourceNotFoundException)
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
sendSheet
void sendSheet(long id, SheetEmail email) throws SmartsheetException
Send a sheet as a PDF attachment via email to the designated recipients.
It mirrors to the following Smartsheet REST API method: POST /sheet/{sheetId}/emails
- Parameters:
id
- the idemail
- the email- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
getPublishStatus
SheetPublish getPublishStatus(long id) throws SmartsheetException
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 /sheet/{sheetId}/publish
- Parameters:
id
- the id- Returns:
- the publish status (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null)
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
updatePublishStatus
SheetPublish updatePublishStatus(long id, SheetPublish publish) throws SmartsheetException
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 /sheet/{sheetId}/publish
- Parameters:
id
- the idpublish
- the SheetPublish object limited.- Returns:
- the update SheetPublish object (note that if there is no such resource, this method will throw a ResourceNotFoundException rather than returning null).
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
copySheet
Sheet copySheet(long sheetId, ContainerDestination containerDestination, java.util.EnumSet<SheetCopyInclusion> includes) throws SmartsheetException
Creates a copy of the specified sheet.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy
Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation
- Parameters:
sheetId
- the sheet idcontainerDestination
- describes the destination containerincludes
- optional parameters to include- Returns:
- the sheet
- Throws:
SmartsheetException
- the smartsheet exception
-
copySheet
Sheet copySheet(long sheetId, ContainerDestination containerDestination, java.util.EnumSet<SheetCopyInclusion> includes, java.util.EnumSet<CopyExclusion> excludes) throws SmartsheetException
Creates a copy of the specified sheet.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy
Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation
- Parameters:
sheetId
- the sheet idcontainerDestination
- describes the destination containerincludes
- optional parameters to includeexcludes
- optional parameters to exclude- Returns:
- the sheet
- Throws:
SmartsheetException
- the smartsheet exception
-
moveSheet
Sheet moveSheet(long sheetId, ContainerDestination containerDestination) throws SmartsheetException
Moves the specified Sheet to another location.
It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/move
Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation
- Parameters:
sheetId
- the folder idcontainerDestination
- describes the destination container- Returns:
- the sheet
- Throws:
SmartsheetException
- the smartsheet exception
-
createUpdateRequest
@Deprecated(since="2.0.0", forRemoval=true) UpdateRequest createUpdateRequest(long sheetId, MultiRowEmail email) throws SmartsheetException
Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useSheetUpdateRequestResources
instead.Creates an Update Request for the specified Row(s) within the Sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/updaterequests
Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any problem with the REST API authorization(access token) - ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - SmartsheetRestException : if there is any other REST API related error occurred during the operation - SmartsheetException : if there is any other error occurred during the operation
- Parameters:
sheetId
- the sheet idemail
- the email- Returns:
- the update request object
- Throws:
SmartsheetException
- the smartsheet exception
-
sortSheet
Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier) throws SmartsheetException
Sort a sheet according to the sort criteria.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/sort
- Parameters:
sheetId
- the sheet idsortSpecifier
- the sort criteria- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
sortSheet
Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier, java.lang.Integer level) throws SmartsheetException
Sort a sheet according to the sort criteria.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/sort
- Parameters:
sheetId
- the sheet idsortSpecifier
- the sort criterialevel
- compatibility level- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
shareResources
ShareResources shareResources()
Return the ShareResources object that provides access to Share resources associated with Sheet resources.
- Returns:
- the share resources object
-
rowResources
SheetRowResources rowResources()
Return the SheetRowResources object that provides access to Row resources associated with Sheet resources.
- Returns:
- the sheet row resources
-
columnResources
SheetColumnResources columnResources()
Return the SheetColumnResources object that provides access to Column resources associated with Sheet resources.
- Returns:
- the sheet column resources
-
attachmentResources
SheetAttachmentResources attachmentResources()
Return the AttachmentResources object that provides access to attachment resources associated with Sheet resources.
- Returns:
- the associated attachment resources
-
discussionResources
SheetDiscussionResources discussionResources()
Return the SheetDiscussionResources object that provides access to discussion resources associated with Sheet resources.
- Returns:
- the associated discussion resources
-
commentResources
SheetCommentResources commentResources()
Return the SheetCommentResources object that provides access to discussion resources associated with Sheet resources.
- Returns:
- the associated comment resources
-
updateRequestResources
SheetUpdateRequestResources updateRequestResources()
Return the SheetUpdateRequestResources object that provides access to update request resources associated with Sheet resources.
- Returns:
- the associated update request resources
-
filterResources
SheetFilterResources filterResources()
Return the SheetFilterResources object that provides access to sheet filter resources associated with Sheet resources.
- Returns:
- the associated sheet filter resources
-
automationRuleResources
SheetAutomationRuleResources automationRuleResources()
Return the SheetAutomationRuleResources object that provides access to automation rule resources associated with Sheet resources.
- Returns:
- the associated automation rule resources
-
crossSheetReferenceResources
SheetCrossSheetReferenceResources crossSheetReferenceResources()
Return the CrossSheetReferenceResources object that provides access to cross sheet reference resources associated with Sheet resources.
- Returns:
- the associated cross sheet reference resources
-
summaryResources
SheetSummaryResources summaryResources()
Return the SheetSummaryResources object that provides access to the sheet summary resources associated with the Sheet resources.- Returns:
- the sheet summary resources
-
-