CellData
Data about a specific cell.
JSON representation |
---|
{ "userEnteredValue": { object ( |
Fields | |
---|---|
userEnteredValue
|
The value the user entered in the cell. e.g.,
|
effectiveValue
|
The effective value of the cell. For cells with formulas, this is the calculated value. For cells with literals, this is the same as the userEnteredValue. This field is read-only. |
formattedValue
|
The formatted value of the cell. This is the value as it's shown to the user. This field is read-only. |
userEnteredFormat
|
The format the user entered for the cell. When writing, the new format will be merged with the existing format. |
effectiveFormat
|
The effective format being used by the cell. This includes the results of applying any conditional formatting and, if the cell contains a formula, the computed number format. If the effective format is the default format, effective format will not be written. This field is read-only. |
hyperlink
|
A hyperlink this cell points to, if any. If the cell contains multiple hyperlinks, this field will be empty. This field is read-only. To set it, use a
|
note
|
Any note on the cell. |
textFormatRuns[]
|
Runs of rich text applied to subsections of the cell. Runs are only valid on user entered strings, not formulas, bools, or numbers. Properties of a run start at a specific index in the text and continue until the next run. Runs will inherit the properties of the cell unless explicitly changed.
When writing, the new runs will overwrite any prior runs. When writing a new
|
dataValidation
|
A data validation rule on the cell, if any. When writing, the new data validation rule will overwrite any prior rule. |
pivotTable
|
A pivot table anchored at this cell. The size of pivot table itself is computed dynamically based on its data, grouping, filters, values, etc. Only the top-left cell of the pivot table contains the pivot table definition. The other cells will contain the calculated values of the results of the pivot in their
|
dataSourceTable
|
A data source table anchored at this cell. The size of data source table itself is computed dynamically based on its configuration. Only the first cell of the data source table contains the data source table definition. The other cells will contain the display values of the data source table result in their
|
dataSourceFormula
|
Output only. Information about a data source formula on the cell. The field is set if
|
CellFormat
The format of a cell.
JSON representation |
---|
{ "numberFormat": { object ( |
Fields | |
---|---|
numberFormat
|
A format describing how number values should be represented to the user. |
backgroundColor
|
The background color of the cell. Deprecated: Use
|
backgroundColorStyle
|
The background color of the cell. If
|
borders
|
The borders of the cell. |
padding
|
The padding of the cell. |
horizontalAlignment
|
The horizontal alignment of the value in the cell. |
verticalAlignment
|
The vertical alignment of the value in the cell. |
wrapStrategy
|
The wrap strategy for the value in the cell. |
textDirection
|
The direction of the text in the cell. |
textFormat
|
The format of the text in the cell (unless overridden by a format run). Setting a cell-level link here clears the cell's existing links. Setting the link field in a
|
hyperlinkDisplayType
|
If one exists, how a hyperlink should be displayed in the cell. |
textRotation
|
The rotation applied to text in the cell. |
NumberFormat
The number format of a cell.
JSON representation |
---|
{
"type": enum (
|
Fields | |
---|---|
type
|
The type of the number format. When writing, this field must be set. |
pattern
|
Pattern string used for formatting. If not set, a default pattern based on the user's locale will be used if necessary for the given type. See the Date and Number Formats guide for more information about the supported patterns. |
NumberFormatType
The number format of the cell. In this documentation the locale is assumed to be en_US, but the actual format depends on the locale of the spreadsheet.
Enums | |
---|---|
NUMBER_FORMAT_TYPE_UNSPECIFIED
|
The number format is not specified and is based on the contents of the cell. Do not explicitly use this. |
TEXT
|
Text formatting, e.g
1000.12
|
NUMBER
|
Number formatting, e.g,
1,000.12
|
PERCENT
|
Percent formatting, e.g
10.12%
|
CURRENCY
|
Currency formatting, e.g
$1,000.12
|
DATE
|
Date formatting, e.g
9/26/2008
|
TIME
|
Time formatting, e.g
3:59:00 PM
|
DATE_TIME
|
Date+Time formatting, e.g
9/26/08 15:59:00
|
SCIENTIFIC
|
Scientific number formatting, e.g
1.01E+03
|
Borders
The borders of the cell.
JSON representation |
---|
{ "top": { object ( |
Fields | |
---|---|
top
|
The top border of the cell. |
bottom
|
The bottom border of the cell. |
left
|
The left border of the cell. |
right
|
The right border of the cell. |
Border
A border along a cell.
JSON representation |
---|
{ "style": enum ( |
Fields | |
---|---|
style
|
The style of the border. |
width
|
The width of the border, in pixels. Deprecated; the width is determined by the "style" field. |
color
|
The color of the border. Deprecated: Use
|
colorStyle
|
The color of the border. If
|
Style
The style of a border.
Enums | |
---|---|
STYLE_UNSPECIFIED
|
The style is not specified. Do not use this. |
DOTTED
|
The border is dotted. |
DASHED
|
The border is dashed. |
SOLID
|
The border is a thin solid line. |
SOLID_MEDIUM
|
The border is a medium solid line. |
SOLID_THICK
|
The border is a thick solid line. |
NONE
|
No border. Used only when updating a border in order to erase it. |
DOUBLE
|
The border is two solid lines. |
Padding
The amount of padding around the cell, in pixels. When updating padding, every field must be specified.
JSON representation |
---|
{ "top": integer, "right": integer, "bottom": integer, "left": integer } |
Fields | |
---|---|
top
|
The top padding of the cell. |
right
|
The right padding of the cell. |
bottom
|
The bottom padding of the cell. |
left
|
The left padding of the cell. |
VerticalAlign
The vertical alignment of text in a cell.
Enums | |
---|---|
VERTICAL_ALIGN_UNSPECIFIED
|
The vertical alignment is not specified. Do not use this. |
TOP
|
The text is explicitly aligned to the top of the cell. |
MIDDLE
|
The text is explicitly aligned to the middle of the cell. |
BOTTOM
|
The text is explicitly aligned to the bottom of the cell. |
WrapStrategy
How to wrap text in a cell.
Enums | |
---|---|
WRAP_STRATEGY_UNSPECIFIED
|
The default value, do not use. |
OVERFLOW_CELL
|
Lines that are longer than the cell width will be written in the next cell over, so long as that cell is empty. If the next cell over is non-empty, this behaves the same as
|
LEGACY_WRAP
|
This wrap strategy represents the old Google Sheets wrap strategy where words that are longer than a line are clipped rather than broken. This strategy is not supported on all platforms and is being phased out. Example:
|
CLIP
|
Lines that are longer than the cell width will be clipped. The text will never wrap to the next line unless the user manually inserts a new line. Example:
|
WRAP
|
Words that are longer than a line are wrapped at the character level rather than clipped. Example:
|
TextDirection
The direction of text in a cell.
Enums | |
---|---|
TEXT_DIRECTION_UNSPECIFIED
|
The text direction is not specified. Do not use this. |
LEFT_TO_RIGHT
|
The text direction of left-to-right was set by the user. |
RIGHT_TO_LEFT
|
The text direction of right-to-left was set by the user. |
HyperlinkDisplayType
Whether to explicitly render a hyperlink. If not specified, the hyperlink is linked.
Enums | |
---|---|
HYPERLINK_DISPLAY_TYPE_UNSPECIFIED
|
The default value: the hyperlink is rendered. Do not use this. |
LINKED
|
A hyperlink should be explicitly rendered. |
PLAIN_TEXT
|
A hyperlink should not be rendered. |
TextRotation
The rotation applied to text in a cell.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
type . The type of rotation, vertical or angled.
type
can be only one of the following:
|
|
angle
|
The angle between the standard orientation and the desired orientation. Measured in degrees. Valid values are between -90 and 90. Positive angles are angled upwards, negative are angled downwards. Note: For LTR text direction positive angles are in the counterclockwise direction, whereas for RTL they are in the clockwise direction |
vertical
|
If true, text reads top to bottom, but the orientation of individual characters is unchanged. For example:
|
TextFormatRun
A run of a text format. The format of this run continues until the start index of the next run. When updating, all fields must be set.
JSON representation |
---|
{
"startIndex": integer,
"format": {
object (
|
Fields | |
---|---|
startIndex
|
The zero-based character index where this run starts, in UTF-16 code units. |
format
|
The format of this run. Absent values inherit the cell's format. |
DataValidationRule
A data validation rule.
JSON representation |
---|
{
"condition": {
object (
|
Fields | |
---|---|
condition
|
The condition that data in the cell must match. |
inputMessage
|
A message to show the user when adding data to the cell. |
strict
|
True if invalid data should be rejected. |
showCustomUi
|
True if the UI should be customized based on the kind of condition. If true, "List" conditions will show a dropdown. |
DataSourceTable
A data source table, which allows the user to import a static table of data from the
DataSource
into Sheets. This is also known as "Extract" in the Sheets editor.
JSON representation |
---|
{ "dataSourceId": string, "columnSelectionType": enum ( |
Fields | |
---|---|
dataSourceId
|
The ID of the data source the data source table is associated with. |
columnSelectionType
|
The type to select columns for the data source table. Defaults to
|
columns[]
|
Columns selected for the data source table. The
|
filterSpecs[]
|
Filter specifications in the data source table. |
sortSpecs[]
|
Sort specifications in the data source table. The result of the data source table is sorted based on the sort specifications in order. |
rowLimit
|
The limit of rows to return. If not set, a default limit is applied. Please refer to the Sheets editor for the default and max limit. |
dataExecutionStatus
|
Output only. The data execution status. |
DataSourceTableColumnSelectionType
The data source table column selection types.
Enums | |
---|---|
DATA_SOURCE_TABLE_COLUMN_SELECTION_TYPE_UNSPECIFIED
|
The default column selection type, do not use. |
SELECTED
|
Select columns specified by
columns
field.
|
SYNC_ALL
|
Sync all current and future columns in the data source. If set, the data source table fetches all the columns in the data source at the time of refresh. |
DataSourceFormula
A data source formula.
JSON representation |
---|
{
"dataSourceId": string,
"dataExecutionStatus": {
object (
|
Fields | |
---|---|
dataSourceId
|
The ID of the data source the formula is associated with. |
dataExecutionStatus
|
Output only. The data execution status. |