Spreadsheet Functions

This section describes Spreadsheet-related functions available in Model contexts.

When these functions are used from the Spreadsheet component, the required identifier is provided automatically by the component session. These functions operate on an opened Spreadsheet session, which represents the runtime state of the Spreadsheet while it is open. Manual construction of the identifier is only needed when Spreadsheet model functions are called directly.

Permission levels in this section describe the minimum access level required to call a function in Model contexts. User operations available in dashboards are described separately in Model Spreadsheet Permissions and may additionally depend on the specific operation being performed.

For some functions, the effective required permission level may be higher depending on which Spreadsheet data is being modified.

Spreadsheet Get

This function is used to return Spreadsheet data.

Function Name:

spreadsheetGet

Permissions:

Accessible at Observer permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

includeCells

Boolean

True if cell data should be included in the response.

ranges

Data Table

Optional list of cell ranges (see Range).

Output Records:

1

Output Format:

see Spreadsheet Data

Spreadsheet Update

This function is used to update Spreadsheet data.

It accepts a Spreadsheet session identifier and a set of Spreadsheet structures to be replaced or updated. This function is the model-level bulk update operation for cells, merged ranges, groups, row and column metadata, conditional formatting rules, and dimension operations.

Function Name:

spreadsheetUpdate

Permissions:

Accessible at Observer permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

cells

Data Table

List of cells with data (see Cell). If specified, existing cells are removed and replaced.

mergedRanges

Data Table

List of merged cell ranges (see Range). If specified, existing merged ranges are removed and replaced.

mergeCells

Data Table

List of ranges to be merged (see Range).

unmergeCells

Data Table

List of ranges to be unmerged (see Range).

groups

Data Table

List of groups (see Group). If specified, existing groups are removed and replaced.

addGroups

Data Table

List of groups to be added (see Group).

removeGroups

Data Table

List of groups to be removed (see Group).

updateGroups

Data Table

List of groups to be updated (see Group).

updateColumnsMetadata

Data Table

Updated column metadata (see Dimension Properties).

updateRowsMetadata

Data Table

Updated row metadata (see Dimension Properties).

columnsMetadata

Data Table

Full column metadata to be set (see Dimension Properties).

rowsMetadata

Data Table

Full row metadata to be set (see Dimension Properties).

insertDimension

Data Table

Dimension insert operation data (see Dimension Range / Dimension Properties).

moveDimension

Data Table

Dimension move operation data.

deleteDimension

Data Table

Dimension delete operation data (see Dimension Range / Dimension Properties).

addConditionalFormat

Data Table

Conditional formatting entries to be added (see Conditional Format).

updateConditionalFormat

Data Table

Conditional formatting entries to be updated (see Conditional Format).

deleteConditionalFormat

Data Table

Conditional formatting entries to be removed (see Conditional Format).

insertRange

Data Table

Range insert operation data (see Range).

deleteRange

Data Table

Range delete operation data (see Range).

Output Records:

None

Output Format:

None

Spreadsheet Cells Get

This function is used to return Spreadsheet cell data for the specified ranges.

Function Name:

spreadsheetCellsGet

Permissions:

Accessible at Observer permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

ranges

Data Table

List of ranges whose cell data should be returned (see Range).

Output Records:

0…Unlimited

Output Format:

see Cell

Spreadsheet Cells Update

This function is used to update Spreadsheet cell data.

Function Name:

spreadsheetCellsUpdate

Permissions:

Accessible at Observer permission level

The required permission level depends on which parts of the cell are being updated:

  • Operator for value updates

  • Engineer for binding updates

  • Manager for styles, formats, and comments

  • Engineer if the update changes read-only behavior.

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

cells

Data Table

List of cells with data to be updated (see Cell).

Output Records:

None

Output Format:

None

Spreadsheet Cells Clear

This function is used to clear Spreadsheet cells in the specified ranges.

Function Name:

spreadsheetCellsClear

Permissions:

Accessible at Manager permission level. Engineer permission level is required when clearing cells containing bindings.

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

ranges

Data Table

List of ranges whose cells should be cleared (see Range).

Output Records:

None

Output Format:

None

Spreadsheet Values Update

This function is used to update Spreadsheet cell values.

Function Name:

spreadsheetValuesUpdate

Permissions:

Accessible at Operator permission level. A higher permission level may be required if the update changes read-only behavior.

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

values

Data Table

List of cells with values to be updated (see Cell).

Output Records:

None

Output Format:

None

Spreadsheet Bindings Update

This function is used to update Spreadsheet formulas.

Function Name:

spreadsheetBindingsUpdate

Permissions:

Accessible at Engineer permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

values

Data Table

List of cells with formulas to be updated (see Cell).

Output Records:

None

Output Format:

None

Spreadsheet Formats Update

This function is used to update Spreadsheet cell formats.

Function Name:

spreadsheetFormatsUpdate

Permissions:

Accessible at Manager permission level. Engineer permission level is required if the update changes read-only behavior.

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

values

Data Table

List of cells with formats to be updated (see Cell).

Output Records:

None

Output Format:

None

Spreadsheet Styles Update

This function is used to update Spreadsheet cell styles.

Function Name:

spreadsheetStylesUpdate

Permissions:

Accessible at Manager permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

values

Data Table

List of cells with styles to be updated (see Cell).

Output Records:

None

Output Format:

None

Spreadsheet Comments Update

This function is used to update Spreadsheet comments.

Function Name:

spreadsheetCommentsUpdate

Permissions:

Accessible at Manager permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

values

Data Table

List of cells with comments to be updated (see Cell).

Output Records:

None

Output Format:

None

Spreadsheet Evaluate

This function is used to recalculate cell formulas in the specified Spreadsheet ranges.

Function Name:

spreadsheetEvaluate

Permissions:

Accessible at Observer permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

ranges

Data Table

List of ranges whose formulas should be recalculated (see Range). If no range is specified, expressions of all cells will be re-evaluated.

Output Records:

None

Output Format:

None

Spreadsheet Export

This function is used to export Spreadsheet data to a file.

Function Name:

spreadsheetExport

Permissions:

Accessible at Observer permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

name

String

Spreadsheet name.

context

String

Path to the model instance context. If not specified, the current model context path is used.

fileType

Integer

Export format. Supported values:

0 - .tbl

3 - .csv

6 - .pdf

7 - .xlsx.

exportFormula

Boolean

Controls how formulas are exported when fileType is .xlsx.

Possible values:

true — formulas are preserved in exported cells. When the file is opened in spreadsheet software, those formulas are evaluated and their results are displayed.

false — exported cells contain static calculated values only.

When fileType is .pdf, formulas are not preserved; only calculated values are exported.

Output Records:

1

Output Format:

 

 

 

Name

Type

Description

data

Data

Data block with exported Spreadsheet data.

Spreadsheet Import

This function is used to import data into a Spreadsheet.

Function Name:

spreadsheetImport

Permissions:

Accessible at Engineer permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

data

Data

Data block with imported Spreadsheet data.

override

Boolean

If true and a Spreadsheet with the same identifier already exists, its data is replaced. If false, the function returns an error.

context

String

Path to the model instance context.

fileName

String

Name and the extension of the file to be imported. Supported formats:

  • .tbl

  • .csv

  • .xlsx.

importOptions

Data Table

CSV import options. Used only when importing data from a .csv file.

Output Records:

None

Output Format:

None

Spreadsheet Save

This function is used to save Spreadsheet data.

Function Name:

spreadsheetSave

Permissions:

Accessible at Operator permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

ranges

Data Table

List of ranges to be saved (see Range).

Output Records:

None

Output Format:

None

Spreadsheet Sort

This function is used to sort Spreadsheet data according to the specified sorting settings.

Function Name:

spreadsheetSort

Permissions:

Accessible at Manager permission level

Input Records:

1

Input Format:

 

 

 

Name

Type

Description

id

String

Spreadsheet session identifier.

sortingParameter

Data Table

Sorting parameter (see Sorting Parameter).

Output Records:

None

Output Format:

None

Was this page helpful?