Spreadsheet Data Structures

This section describes common data structures used to represent Spreadsheet data.
These structures describe the format of Spreadsheet values used in related sections.

Spreadsheet

This structure represents a single Spreadsheet stored in the Model.

Record Format:

Field Name

Field Type

Field Description

name

String

Spreadsheet name.

description

String

Spreadsheet description.

autoEvaluationEnabled

Boolean

Enables background formula recalculation.

data

Data Table

Spreadsheet data.

Spreadsheet Data

This structure defines the data returned by the Spreadsheet.

Record Format:

Field Name

Field Type

Field Description

cells

Data Table

Spreadsheet cell data. (see Cell).

mergedRanges

Data Table

Information about merged cell ranges. (see Range).

groups

Data Table

Information about grouped rows and columns. (see Group).

rowsMetadata

Data Table

Metadata for Spreadsheet rows. (see Dimension Properties).

columnsMetadata

Data Table

Metadata for Spreadsheet columns. (see Dimension Properties).

properties

Data Table

General Spreadsheet properties. (see Spreadsheet Properties).

conditionalFormats

Data Table

Conditional formatting rules applied in the Spreadsheet. (see Conditional Format).

styles

Data Table

Cell style definitions used in the Spreadsheet. (see Styles).

formats

Data Table

Cell format definitions used in the Spreadsheet. (see Formats).

Spreadsheet Properties

This structure defines general Spreadsheet properties.

Record Format:

Field Name

Field Type

Field Description

frozenRowCount

Integer

Number of frozen rows.

frozenColumnCount

Integer

Number of frozen columns.

hideGridlines

Boolean

If true, gridlines are hidden.

showFormulas

Boolean

If true, formulas are displayed instead of calculated values.

Cell

This structure defines Spreadsheet cell data.

Record Format:

Field Name

Field Type

Field Description

rowIndex

Integer

Zero-based row index of the cell.

columnIndex

Integer

Zero-based column index of the cell.

value

String

Cell value.

binding

String

Cell expression or binding.

formatId

Long

Identifier of the format applied to the cell (see Formats).

cellFormat

String

Cell format. (This field is for internal use only).

styleId

Long

Identifier of the style applied to the cell (see Styles).

cellStyle

Data Table

Cell style data (see Cell Style). (This field is for internal use only).

error

Data Table

Cell error data (see Cell Error).

comments

Data Table

Cell comments (see Comment).

Cell Style

This structure defines visual style properties of a cell.

Record Format:

Field Name

Field Type

Field Description

fontFamily

String

Font family name.

fontSize

Integer

Font size.

fontWeight

Boolean

If true, bold font is applied.

fontItalic

Boolean

If true, italic font is applied.

strike

Boolean

If true, strikethrough is applied.

underline

Boolean

If true, underline is applied.

fontColor

Color

Text color.

backgroundColor

Color

Cell background color.

verticalAlign

String

Vertical alignment. Supported values:

  • top

  • middle

  • bottom.

horizontalAlignment

String

Horizontal alignment. Supported values:

  • left

  • center

  • right.

borderLeft

String

Left border style, for example 1px solid #000000FF.

borderRight

String

Right border style, for example 1px solid #000000FF.

borderTop

String

Top border style, for example 1px solid #000000FF.

borderBottom

String

Bottom border style, for example 1px solid #000000FF.

textTransfer

String

Text wrapping mode. Supported values:

  • trim

  • transfer

  • overlay.

Cell Error

This structure defines an error associated with a Spreadsheet cell.

Record Format:

Field Name

Field Type

Field Description

type

Integer

Integer code of the cell error type. For error types, see the official Google reference.

message

String

Error description.

Comment

This structure defines a comment associated with a Spreadsheet cell.

Record Format:

Field Name

Field Type

Field Description

comment

String

Comment text.

author

String

Author of the comment.

date

Date

Date when the comment was added.

Range

This structure defines a rectangular range of cells in the Spreadsheet.

Record Format:

Field Name

Field Type

Field Description

startRowIndex

Integer

Zero-based index of the first row in the range.

endRowIndex

Integer

Zero-based index of the last row in the range.

startColumnIndex

Integer

Zero-based index of the first column in the range.

endColumnIndex

Integer

Ending column index of the range.

Group

This structure defines a grouped range of rows or columns.

Record Format:

Field Name

Field Type

Field Description

dimension

Integer

Group dimension. Supported values:

  • 0 — Row

  • 1 — Column.

startIndex

Integer

Start index of the group.

endIndex

Integer

End index of the group.

collapsed

Boolean

Indicates whether the group is collapsed.

depth

Integer

Group depth level.

Dimension Properties

This structure defines metadata of a row or column.

Record Format:

Field Name

Field Type

Field Description

index

Integer

Zero-based row or column index.

size

Integer

Row height or column width in pixels.

hiddenByUser

Boolean

If true, the row or column is hidden.

Dimension Range

This structure defines a row or column range used in dimension update operations.

Record Format:

Field Name

Field Type

Field Description

dimension

Integer

Dimension type. 0 for rows, 1 for columns.

startIndex

Integer

Zero-based start index of the dimension range.

endIndex

Integer

Zero-based end index of the dimension range.

Conditional Format

This structure defines a conditional formatting rule used to change selected cell properties when specified conditions are met. Conditional formatting rules are stored as part of Spreadsheet Data in the conditionalFormats field.

Record Format:

Field Name

Field Type

Field Description

target

String

Target attribute to which the conditional formatting rule is applied.

range

String

Cell range (in A1 notation) to which the conditional formatting rule is applied.

condition

String

Condition used to evaluate the rule.

expression

String

Expression that defines the conditional formatting rule.

Styles

This structure defines cached cell styles.

Record Format:

Field Name

Field Type

Field Description

id

Long

Unique identifier of the cached style. 0 is the default style.

style

Data Table

Cell style data (see Cell Style).

Formats

This structure defines cached cell formats.

Record Format:

Field Name

Field Type

Field Description

id

Long

Unique identifier of the cached format. 0 is the default format.

format

String

Encoded cell format.

Sorting Parameter

This structure defines parameters used to sort data in the Spreadsheet.

Record Format:

Field Name

Field Type

Field Description

range

String

Cell range to which sorting is applied (in A1 notation).

column

String

Column used for sorting.

direction

Integer

Sorting direction. Supported values:

0 — Descending

1 — Ascending.

Was this page helpful?