Interface SheetResources
-
public interface SheetResourcesThis 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 SheetAttachmentResourcesattachmentResources()Return the AttachmentResources object that provides access to attachment resources associated with Sheet resources.SheetAutomationRuleResourcesautomationRuleResources()Return the SheetAutomationRuleResources object that provides access to automation rule resources associated with Sheet resources.SheetColumnResourcescolumnResources()Return the SheetColumnResources object that provides access to Column resources associated with Sheet resources.SheetCommentResourcescommentResources()Return the SheetCommentResources object that provides access to discussion resources associated with Sheet resources.SheetcopySheet(long sheetId, ContainerDestination containerDestination, java.util.EnumSet<SheetCopyInclusion> includes)Creates a copy of the specified sheet.SheetcopySheet(long sheetId, ContainerDestination containerDestination, java.util.EnumSet<SheetCopyInclusion> includes, java.util.EnumSet<CopyExclusion> excludes)Creates a copy of the specified sheet.SheetcreateSheet(Sheet sheet)Create a sheet in default "Sheets" collection.SheetcreateSheetFromTemplate(Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes)Create a sheet (from existing sheet or template) in default "Sheets" collection.SheetcreateSheetInFolder(long folderId, Sheet sheet)Create a sheet in given folder.SheetcreateSheetInFolderFromTemplate(long folderID, Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes)Create a sheet (from existing sheet or template) in given folder.SheetcreateSheetInWorkspace(long workspaceId, Sheet sheet)Create a sheet in given workspace.SheetcreateSheetInWorkspaceFromTemplate(long workspaceId, Sheet sheet, java.util.EnumSet<SheetTemplateInclusion> includes)Create a sheet (from existing sheet or template) in given workspace.UpdateRequestcreateUpdateRequest(long sheetId, MultiRowEmail email)Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.SheetCrossSheetReferenceResourcescrossSheetReferenceResources()Return the CrossSheetReferenceResources object that provides access to cross sheet reference resources associated with Sheet resources.voiddeleteSheet(long id)Delete a sheet.SheetDiscussionResourcesdiscussionResources()Return the SheetDiscussionResources object that provides access to discussion resources associated with Sheet resources.SheetFilterResourcesfilterResources()Return the SheetFilterResources object that provides access to sheet filter resources associated with Sheet resources.SheetPublishgetPublishStatus(long id)Get the status of the Publish settings of the sheet, including the URLs of any enabled publishings.SheetgetSheet(long sheetId)Get sheet by ID.SheetgetSheet(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.SheetgetSheet(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.SheetgetSheet(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.voidgetSheetAsCSV(long id, java.io.OutputStream outputStream)Get a sheet as an Excel file.voidgetSheetAsExcel(long id, java.io.OutputStream outputStream)Get a sheet as an Excel file.voidgetSheetAsPDF(long id, java.io.OutputStream outputStream, PaperSize paperSize)Get a sheet as a PDF file.intgetSheetVersion(long id)Get a sheet version.SheetimportCsv(java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)Imports a sheet.SheetimportCsvInFolder(long folderID, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)Imports a sheet in given folder.SheetimportCsvInWorkspace(long workspaceId, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)Imports a sheet in given workspace.SheetimportXlsx(java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)Imports a sheet.SheetimportXlsxInFolder(long folderId, java.lang.String file, java.lang.String sheetName, java.lang.Integer headerRowIndex, java.lang.Integer primaryColumnIndex)Imports a sheet in given folder.SheetimportXlsxInWorkspace(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.SheetmoveSheet(long sheetId, ContainerDestination containerDestination)Moves the specified Sheet to another location.SheetRowResourcesrowResources()Return the SheetRowResources object that provides access to Row resources associated with Sheet resources.voidsendSheet(long id, SheetEmail email)Send a sheet as a PDF attachment via email to the designated recipients.ShareResourcesshareResources()Return the ShareResources object that provides access to Share resources associated with Sheet resources.SheetsortSheet(long sheetId, SortSpecifier sortSpecifier)Sort a sheet according to the sort criteria.SheetsortSheet(long sheetId, SortSpecifier sortSpecifier, java.lang.Integer level)Sort a sheet according to the sort criteria.SheetSummaryResourcessummaryResources()Return the SheetSummaryResources object that provides access to the sheet summary resources associated with the Sheet resources.SheetPublishupdatePublishStatus(long id, SheetPublish publish)Sets the publish status of a sheet and returns the new status, including the URLs of any enabled publishings.SheetUpdateRequestResourcesupdateRequestResources()Return the SheetUpdateRequestResources object that provides access to update request resources associated with Sheet resources.SheetupdateSheet(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 SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useUserResourcesinsteadList 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 SmartsheetExceptionGet 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 SmartsheetExceptionGet 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 SmartsheetExceptionGet 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 SmartsheetExceptionDelete 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 SmartsheetExceptionGet 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 SmartsheetExceptionSend 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 SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useSheetUpdateRequestResourcesinstead.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
-
-