Spreadsheet Service

Spreadsheet

This service allows scripts to create, access, and modify Google Sheets files. See also the guide to storing data in spreadsheets.

Sometimes, spreadsheet operations are bundled together to improve performance, such as when doing multiple calls to a method. If you want to make sure that all pending changes are made right away, for instance to show users information as a script is executing, call SpreadsheetApp.flush().

Classes

NameBrief description
AutoFillSeriesAn enumeration of the types of series used to calculate auto-filled values.
BandingAccess and modify bandings, the color patterns applied to rows or columns of a range.
BandingThemeAn enumeration of banding themes.
BigQueryDataSourceSpecAccess the existing BigQuery data source specification.
BigQueryDataSourceSpecBuilderThe builder for BigQueryDataSourceSpecBuilder.
BooleanConditionAccess boolean conditions in ConditionalFormatRules.
BooleanCriteriaAn enumeration representing the boolean criteria that can be used in conditional format or filter.
BorderStyleStyles that can be set on a range using Range.setBorder(top, left, bottom, right, vertical, horizontal, color, style).
CellImageRepresents an image to add to a cell.
CellImageBuilderBuilder for CellImage.
ColorA representation for a color.
ColorBuilderThe builder for ColorBuilder.
ConditionalFormatRuleAccess conditional formatting rules.
ConditionalFormatRuleBuilderBuilder for conditional format rules.
ContainerInfoAccess the chart's position within a sheet.
CopyPasteTypeAn enumeration of possible special paste types.
DataExecutionErrorCodeAn enumeration of data execution error codes.
DataExecutionStateAn enumeration of data execution states.
DataExecutionStatusThe data execution status.
DataSourceAccess and modify existing data source.
DataSourceChartAccess and modify an existing data source chart.
DataSourceColumnAccess and modify a data source column.
DataSourceFormulaAccess and modify existing data source formulas.
DataSourceParameterAccess existing data source parameters.
DataSourceParameterTypeAn enumeration of data source parameter types.
DataSourcePivotTableAccess and modify existing data source pivot table.
DataSourceRefreshScheduleAccess and modify an existing refresh schedule.
DataSourceRefreshScheduleFrequencyAccess a refresh schedule's frequency, which specifies how often and when to refresh.
DataSourceRefreshScopeAn enumeration of scopes for refreshes.
DataSourceSheetAccess and modify existing data source sheet.
DataSourceSheetFilterAccess and modify an existing data source sheet filter.
DataSourceSpecAccess the general settings of an existing data source spec.
DataSourceSpecBuilderThe builder for DataSourceSpec.
DataSourceTableAccess and modify existing data source table.
DataSourceTableColumnAccess and modify an existing column in a DataSourceTable.
DataSourceTableFilterAccess and modify an existing data source table filter.
DataSourceTypeAn enumeration of data source types.
DataValidationAccess data validation rules.
DataValidationBuilderBuilder for data validation rules.
DataValidationCriteriaAn enumeration representing the data validation criteria that can be set on a range.
DateTimeGroupingRuleAccess an existing date-time grouping rule.
DateTimeGroupingRuleTypeThe types of date-time grouping rule.
DeveloperMetadataAccess and modify developer metadata.
DeveloperMetadataFinderSearch for developer metadata in a spreadsheet.
DeveloperMetadataLocationAccess developer metadata location information.
DeveloperMetadataLocationTypeAn enumeration of the types of developer metadata location types.
DeveloperMetadataVisibilityAn enumeration of the types of developer metadata visibility.
DimensionAn enumeration of possible directions along which data can be stored in a spreadsheet.
DirectionAn enumeration representing the possible directions that one can move within a spreadsheet using the arrow keys.
DrawingRepresents a drawing over a sheet in a spreadsheet.
EmbeddedAreaChartBuilderBuilder for area charts.
EmbeddedBarChartBuilderBuilder for bar charts.
EmbeddedChartRepresents a chart that has been embedded into a spreadsheet.
EmbeddedChartBuilderBuilder used to edit an EmbeddedChart.
EmbeddedColumnChartBuilderBuilder for column charts.
EmbeddedComboChartBuilderBuilder for combo charts.
EmbeddedHistogramChartBuilderBuilder for histogram charts.
EmbeddedLineChartBuilderBuilder for line charts.
EmbeddedPieChartBuilderBuilder for pie charts.
EmbeddedScatterChartBuilderBuilder for scatter charts.
EmbeddedTableChartBuilderBuilder for table charts.
FilterUse this class to modify existing filters on Grid sheets, the default type of sheet.
FilterCriteriaUse this class to get information about or copy the criteria on existing filters.
FilterCriteriaBuilderTo add criteria to a filter, you must do the following:
  1. Create the criteria builder using SpreadsheetApp.newFilterCriteria().
  2. Add settings to the builder using the methods from this class.
  3. Use build() to assemble the criteria with your specified settings.
FrequencyTypeAn enumeration of frequency types.
GradientConditionAccess gradient (color) conditions in ConditionalFormatRuleApis.
GroupAccess and modify spreadsheet groups.
GroupControlTogglePositionAn enumeration representing the possible positions that a group control toggle can have.
InterpolationTypeAn enumeration representing the interpolation options for calculating a value to be used in a GradientCondition in a ConditionalFormatRule.
LookerDataSourceSpecA DataSourceSpec which is used to access specifically the existing Looker data source specifications.
LookerDataSourceSpecBuilderThe builder for LookerDataSourceSpecBuilder.
NamedRangeCreate, access and modify named ranges in a spreadsheet.
OverGridImageRepresents an image over the grid in a spreadsheet.
PageProtectionAccess and modify protected sheets in the older version of Google Sheets.
PivotFilterAccess and modify pivot table filters.
PivotGroupAccess and modify pivot table breakout groups.
PivotGroupLimitAccess and modify pivot table group limit.
PivotTableAccess and modify pivot tables.
PivotTableSummarizeFunctionAn enumeration of functions that summarize pivot table data.
PivotValueAccess and modify value groups in pivot tables.
PivotValueDisplayTypeAn enumeration of ways to display a pivot value as a function of another value.
ProtectionAccess and modify protected ranges and sheets.
ProtectionTypeAn enumeration representing the parts of a spreadsheet that can be protected from edits.
RangeAccess and modify spreadsheet ranges.
RangeListA collection of one or more Range instances in the same sheet.
RecalculationIntervalAn enumeration representing the possible intervals used in spreadsheet recalculation.
RelativeDateAn enumeration representing the relative date options for calculating a value to be used in date-based BooleanCriteria.
RichTextValueA stylized text string used to represent cell text.
RichTextValueBuilderA builder for Rich Text values.
SelectionAccess the current active selection in the active sheet.
SheetAccess and modify spreadsheet sheets.
SheetTypeThe different types of sheets that can exist in a spreadsheet.
SlicerRepresents a slicer, which is used to filter ranges, charts and pivot tables in a non-collaborative manner.
SortOrderAn enumeration representing the sort order.
SortSpecThe sorting specification.
SpreadsheetAccess and modify Google Sheets files.
SpreadsheetAppAccess and create Google Sheets files.
SpreadsheetThemeAccess and modify existing themes.
TextDirectionAn enumerations of text directions.
TextFinderFind or replace text within a range, sheet or spreadsheet.
TextRotationAccess the text rotation settings for a cell.
TextStyleThe rendered style of text in a cell.
TextStyleBuilderA builder for text styles.
TextToColumnsDelimiterAn enumeration of the types of preset delimiters that can split a column of text into multiple columns.
ThemeColorA representation for a theme color.
ThemeColorTypeAn enum which describes various color entries supported in themes.
ValueTypeAn enumeration of value types returned by Range.getValue() and Range.getValues() from the Range class of the Spreadsheet service.
WrapStrategyAn enumeration of the strategies used to handle cell text wrapping.

AutoFillSeries

Properties

PropertyTypeDescription
DEFAULT_SERIESEnumDefault.
ALTERNATE_SERIESEnumAuto-filling with this setting results in the empty cells in the expanded range being filled with copies of the existing values.

Banding

Methods

MethodReturn typeBrief description
copyTo(range)BandingCopies this banding to another range.
getFirstColumnColorObject()ColorReturns the first alternating column color in the banding, or null if no color is set.
getFirstRowColorObject()ColorReturns the first alternating row color, or null if no color is set.
getFooterColumnColorObject()ColorReturns the color of the last column in the banding, or null if no color is set.
getFooterRowColorObject()ColorReturns the last row color in the banding, or null if no color is set.
getHeaderColumnColorObject()ColorReturns the color of the first column in the banding, or null if no color is set.
getHeaderRowColorObject()ColorReturns the color of the header row or null if no color is set.
getRange()RangeReturns the range for this banding.
getSecondColumnColorObject()ColorReturns the second alternating column color in the banding, or null if no color is set.
getSecondRowColorObject()ColorReturns the second alternating row color, or null if no color is set.
remove()voidRemoves this banding.
setFirstColumnColor(color)BandingSets the first column color that is alternating.
setFirstColumnColorObject(color)BandingSets the first alternating column color in the banding.
setFirstRowColor(color)BandingSets the first row color that is alternating.
setFirstRowColorObject(color)BandingSets the first alternating row color in the banding.
setFooterColumnColor(color)BandingSets the color of the last column.
setFooterColumnColorObject(color)BandingSets the color of the last column in the banding.
setFooterRowColor(color)BandingSets the color of the last row.
setFooterRowColorObject(color)BandingSets the color of the footer row in the banding.
setHeaderColumnColor(color)BandingSets the color of the header column.
setHeaderColumnColorObject(color)BandingSets the color of the header column.
setHeaderRowColor(color)BandingSets the color of the header row.
setHeaderRowColorObject(color)BandingSets the color of the header row.
setRange(range)BandingSets the range for this banding.
setSecondColumnColor(color)BandingSets the second column color that is alternating.
setSecondColumnColorObject(color)BandingSets the second alternating column color in the banding.
setSecondRowColor(color)BandingSets the second row color that is alternating.
setSecondRowColorObject(color)BandingSets the second alternating color in the banding.

BandingTheme

Properties

PropertyTypeDescription
LIGHT_GREYEnumA light grey banding theme.
CYANEnumA cyan banding theme.
GREENEnumA green banding theme.
YELLOWEnumA yellow banding theme.
ORANGEEnumAn orange banding theme.
BLUEEnumA blue banding theme.
TEALEnumA teal banding theme.
GREYEnumA grey banding theme.
BROWNEnumA brown banding theme.
LIGHT_GREENEnumA light green banding theme.
INDIGOEnumAn indigo banding theme.
PINKEnumA pink banding theme.

BigQueryDataSourceSpec

Methods

MethodReturn typeBrief description
copy()DataSourceSpecBuilderCreates a DataSourceSpecBuilder based on this data source's settings.
getDatasetId()StringGets the BigQuery dataset ID.
getParameters()DataSourceParameter[]Gets the parameters of the data source.
getProjectId()StringGets the billing project ID.
getRawQuery()StringGets the raw query string.
getTableId()StringGets the BigQuery table ID.
getTableProjectId()StringGets the BigQuery project ID for the table.
getType()DataSourceTypeGets the type of the data source.

BigQueryDataSourceSpecBuilder

Methods

MethodReturn typeBrief description
build()DataSourceSpecBuilds a data source specification from the settings in this builder.
copy()DataSourceSpecBuilderCreates a DataSourceSpecBuilder based on this data source's settings.
getDatasetId()StringGets the BigQuery dataset ID.
getParameters()DataSourceParameter[]Gets the parameters of the data source.
getProjectId()StringGets the billing project ID.
getRawQuery()StringGets the raw query string.
getTableId()StringGets the BigQuery table ID.
getTableProjectId()StringGets the BigQuery project ID for the table.
getType()DataSourceTypeGets the type of the data source.
removeAllParameters()BigQueryDataSourceSpecBuilderRemoves all the parameters.
removeParameter(parameterName)BigQueryDataSourceSpecBuilderRemoves the specified parameter.
setDatasetId(datasetId)BigQueryDataSourceSpecBuilderSets the BigQuery dataset ID.
setParameterFromCell(parameterName, sourceCell)BigQueryDataSourceSpecBuilderAdds a parameter, or if the parameter with the name exists, updates its source cell for data source spec builders of type DataSourceType.BIGQUERY.
setProjectId(projectId)BigQueryDataSourceSpecBuilderSets the billing BigQuery project ID.
setRawQuery(rawQuery)BigQueryDataSourceSpecBuilderSets the raw query string.
setTableId(tableId)BigQueryDataSourceSpecBuilderSets the BigQuery table ID.
setTableProjectId(projectId)BigQueryDataSourceSpecBuilderSets the BigQuery project ID for the table.

BooleanCondition

Methods

MethodReturn typeBrief description
getBackgroundObject()ColorGets the background color for this boolean condition.
getBold()BooleanReturns true if this boolean condition bolds the text and returns false if this boolean condition removes bolding from the text.
getCriteriaType()BooleanCriteriaGets the rule's criteria type as defined in the BooleanCriteria enum.
getCriteriaValues()Object[]Gets an array of arguments for the rule's criteria.
getFontColorObject()ColorGets the font color for this boolean condition.
getItalic()BooleanReturns true if this boolean condition italicises the text and returns false if this boolean condition removes italics from the text.
getStrikethrough()BooleanReturns true if this boolean condition strikes through the text and returns false if this boolean condition removes strikethrough from the text.
getUnderline()BooleanReturns true if this boolean condition underlines the text and returns false if this boolean condition removes underlining from the text.

BooleanCriteria

Properties

PropertyTypeDescription
CELL_EMPTYEnumThe criteria is met when a cell is empty.
CELL_NOT_EMPTYEnumThe criteria is met when a cell is not empty.
DATE_AFTEREnumThe criteria is met when a date is after the given value.
DATE_BEFOREEnumThe criteria is met when a date is before the given value.
DATE_EQUAL_TOEnumThe criteria is met when a date is equal to the given value.
DATE_NOT_EQUAL_TOEnumThe criteria is met when a date is not equal to the given value.
DATE_AFTER_RELATIVEEnumThe criteria is met when a date is after the relative date value.
DATE_BEFORE_RELATIVEEnumThe criteria is met when a date is before the relative date value.
DATE_EQUAL_TO_RELATIVEEnumThe criteria is met when a date is equal to the relative date value.
NUMBER_BETWEENEnumThe criteria is met when a number that is between the given values.
NUMBER_EQUAL_TOEnumThe criteria is met when a number that is equal to the given value.
NUMBER_GREATER_THANEnumThe criteria is met when a number that is greater than the given value.
NUMBER_GREATER_THAN_OR_EQUAL_TOEnumThe criteria is met when a number that is greater than or equal to the given value.
NUMBER_LESS_THANEnumThe criteria is met when a number that is less than the given value.
NUMBER_LESS_THAN_OR_EQUAL_TOEnumThe criteria is met when a number that is less than or equal to the given value.
NUMBER_NOT_BETWEENEnumThe criteria is met when a number that is not between the given values.
NUMBER_NOT_EQUAL_TOEnumThe criteria is met when a number that is not equal to the given value.
TEXT_CONTAINSEnumThe criteria is met when the input contains the given value.
TEXT_DOES_NOT_CONTAINEnumThe criteria is met when the input does not contain the given value.
TEXT_EQUAL_TOEnumThe criteria is met when the input is equal to the given value.
TEXT_NOT_EQUAL_TOEnumThe criteria is met when the input is not equal to the given value.
TEXT_STARTS_WITHEnumThe criteria is met when the input begins with the given value.
TEXT_ENDS_WITHEnumThe criteria is met when the input ends with the given value.
CUSTOM_FORMULAEnumThe criteria is met when the input makes the given formula evaluate to true.

BorderStyle

Properties

PropertyTypeDescription
DOTTEDEnumDotted line borders.
DASHEDEnumDashed line borders.
SOLIDEnumThin solid line borders.
SOLID_MEDIUMEnumMedium solid line borders.
SOLID_THICKEnumThick solid line borders.
DOUBLEEnumTwo solid line borders.

CellImage

Properties

PropertyTypeDescription
valueTypeValueTypeA field set to ValueType.IMAGE, representing the image value type.

Methods

MethodReturn typeBrief description
getAltTextDescription()StringReturns the alt text description for this image.
getAltTextTitle()StringReturns the alt text title for this image.
getContentUrl()StringReturns a Google-hosted URL to the image.
getUrl()StringGets the image's source URL; returns null if the URL is unavailable.
toBuilder()CellImageBuilderCreates a builder that turns an image into an image value type so that you can place it into a cell.

CellImageBuilder

Properties

PropertyTypeDescription
valueTypeValueTypeA field set to ValueType.IMAGE, representing the image value type.

Methods

MethodReturn typeBrief description
build()CellImageCreates the image value type needed to add an image to a cell.
getAltTextDescription()StringReturns the alt text description for this image.
getAltTextTitle()StringReturns the alt text title for this image.
getContentUrl()StringReturns a Google-hosted URL to the image.
getUrl()StringGets the image's source URL; returns null if the URL is unavailable.
setAltTextDescription(description)CellImageSets the alt-text description for this image.
setAltTextTitle(title)CellImageSets the alt text title for this image.
setSourceUrl(url)CellImageBuilderSets the image source URL.
toBuilder()CellImageBuilderCreates a builder that turns an image into an image value type so that you can place it into a cell.

Color

Methods

MethodReturn typeBrief description
asRgbColor()RgbColorConverts this color to an RgbColor.
asThemeColor()ThemeColorConverts this color to a ThemeColor.
getColorType()ColorTypeGet the type of this color.

ColorBuilder

Methods

MethodReturn typeBrief description
asRgbColor()RgbColorConverts this color to an RgbColor.
asThemeColor()ThemeColorConverts this color to a ThemeColor.
build()ColorCreates a color object from the settings supplied to the builder.
getColorType()ColorTypeGet the type of this color.
setRgbColor(cssString)ColorBuilderSets as RGB color.
setThemeColor(themeColorType)ColorBuilderSets as theme color.

ConditionalFormatRule

Methods

MethodReturn typeBrief description
copy()ConditionalFormatRuleBuilderReturns a rule builder preset with this rule's settings.
getBooleanCondition()BooleanConditionRetrieves the rule's BooleanCondition information if this rule uses boolean condition criteria.
getGradientCondition()GradientConditionRetrieves the rule's GradientCondition information, if this rule uses gradient condition criteria.
getRanges()Range[]Retrieves the ranges to which this conditional format rule is applied.

ConditionalFormatRuleBuilder

Methods

MethodReturn typeBrief description
build()ConditionalFormatRuleConstructs a conditional format rule from the settings applied to the builder.
copy()ConditionalFormatRuleBuilderReturns a rule builder preset with this rule's settings.
getBooleanCondition()BooleanConditionRetrieves the rule's BooleanCondition information if this rule uses boolean condition criteria.
getGradientCondition()GradientConditionRetrieves the rule's GradientCondition information, if this rule uses gradient condition criteria.
getRanges()Range[]Retrieves the ranges to which this conditional format rule is applied.
setBackground(color)ConditionalFormatRuleBuilderSets the background color for the conditional format rule's format.
setBackgroundObject(color)ConditionalFormatRuleBuilderSets the background color for the conditional format rule's format.
setBold(bold)ConditionalFormatRuleBuilderSets text bolding for the conditional format rule's format.
setFontColor(color)ConditionalFormatRuleBuilderSets the font color for the conditional format rule's format.
setFontColorObject(color)ConditionalFormatRuleBuilderSets the font color for the conditional format rule's format.
setGradientMaxpoint(color)ConditionalFormatRuleBuilderClears the conditional format rule's gradient maxpoint value, and instead uses the maximum value in the rule's ranges.
setGradientMaxpointObject(color)ConditionalFormatRuleBuilderClears the conditional format rule's gradient maxpoint value, and instead uses the maximum value in the rule's ranges.
setGradientMaxpointObjectWithValue(color, type, value)ConditionalFormatRuleBuilderSets the conditional format rule's gradient maxpoint fields.
setGradientMaxpointWithValue(color, type, value)ConditionalFormatRuleBuilderSets the conditional format rule's gradient maxpoint fields.
setGradientMidpointObjectWithValue(color, type, value)ConditionalFormatRuleBuilderSets the conditional format rule's gradient midpoint fields.
setGradientMidpointWithValue(color, type, value)ConditionalFormatRuleBuilderSets the conditional format rule's gradient midpoint fields.
setGradientMinpoint(color)ConditionalFormatRuleBuilderClears the conditional format rule's gradient minpoint value, and instead uses the minimum value in the rule's ranges.
setGradientMinpointObject(color)ConditionalFormatRuleBuilderClears the conditional format rule's gradient minpoint value, and instead uses the minimum value in the rule's ranges.
setGradientMinpointObjectWithValue(color, type, value)ConditionalFormatRuleBuilderSets the conditional format rule's gradient minpoint fields.
setGradientMinpointWithValue(color, type, value)ConditionalFormatRuleBuilderSets the conditional format rule's gradient minpoint fields.
setItalic(italic)ConditionalFormatRuleBuilderSets text italics for the conditional format rule's format.
setRanges(ranges)ConditionalFormatRuleBuilderSets one or more ranges to which this conditional format rule is applied.
setStrikethrough(strikethrough)ConditionalFormatRuleBuilderSets text strikethrough for the conditional format rule's format.
setUnderline(underline)ConditionalFormatRuleBuilderSets text underlining for the conditional format rule's format.
whenCellEmpty()ConditionalFormatRuleBuilderSets the conditional format rule to trigger when the cell is empty.
whenCellNotEmpty()ConditionalFormatRuleBuilderSets the conditional format rule to trigger when the cell is not empty.
whenDateAfter(date)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a date is after the given value.
whenDateAfter(date)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a date is after the given relative date.
whenDateBefore(date)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a date is before the given date.
whenDateBefore(date)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a date is before the given relative date.
whenDateEqualTo(date)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a date is equal to the given date.
whenDateEqualTo(date)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a date is equal to the given relative date.
whenFormulaSatisfied(formula)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when that the given formula evaluates to true.
whenNumberBetween(start, end)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a number falls between, or is either of, two specified values.
whenNumberEqualTo(number)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a number is equal to the given value.
whenNumberGreaterThan(number)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a number is greater than the given value.
whenNumberGreaterThanOrEqualTo(number)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a number is greater than or equal to the given value.
whenNumberLessThan(number)ConditionalFormatRuleBuilderSets the conditional conditional format rule to trigger when a number less than the given value.
whenNumberLessThanOrEqualTo(number)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a number less than or equal to the given value.
whenNumberNotBetween(start, end)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a number does not fall between, and is neither of, two specified values.
whenNumberNotEqualTo(number)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when a number is not equal to the given value.
whenTextContains(text)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when that the input contains the given value.
whenTextDoesNotContain(text)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when that the input does not contain the given value.
whenTextEndsWith(text)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when that the input ends with the given value.
whenTextEqualTo(text)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when that the input is equal to the given value.
whenTextStartsWith(text)ConditionalFormatRuleBuilderSets the conditional format rule to trigger when that the input starts with the given value.
withCriteria(criteria, args)ConditionalFormatRuleBuilderSets the conditional format rule to criteria defined by BooleanCriteria values, typically taken from the criteria and arguments of an existing rule.

ContainerInfo

Methods

MethodReturn typeBrief description
getAnchorColumn()IntegerThe chart's left side is anchored in this column.
getAnchorRow()IntegerThe chart's top side is anchored in this row.
getOffsetX()IntegerThe chart's upper left hand corner is offset from the anchor column by this many pixels.
getOffsetY()IntegerThe chart's upper left hand corner is offset from the anchor row by this many pixels.

CopyPasteType

Properties

PropertyTypeDescription
PASTE_NORMALEnumPaste values, formulas, formats and merges.
PASTE_NO_BORDERSEnumPaste values, formulas, formats and merges but without borders.
PASTE_FORMATEnumPaste the format only.
PASTE_FORMULAEnumPaste the formulas only.
PASTE_DATA_VALIDATIONEnumPaste the data validation only.
PASTE_VALUESEnumPaste the values ONLY without formats, formulas or merges.
PASTE_CONDITIONAL_FORMATTINGEnumPaste the color rules only.
PASTE_COLUMN_WIDTHSEnumPaste the column widths only.

DataExecutionErrorCode

Properties

PropertyTypeDescription
DATA_EXECUTION_ERROR_CODE_UNSUPPORTEDEnumA data execution error code that is not supported in Apps Script.
NONEEnumThe data execution has no error.
TIME_OUTEnumThe data execution timed out.
TOO_MANY_ROWSEnumThe data execution returns more rows than the limit.
TOO_MANY_COLUMNSEnumThe data execution returns more columns than the limit.
TOO_MANY_CELLSEnumThe data execution returns more cells than the limit.
ENGINEEnumData execution engine error.
PARAMETER_INVALIDEnumInvalid data execution parameter.
UNSUPPORTED_DATA_TYPEEnumThe data execution returns unsupported data type.
DUPLICATE_COLUMN_NAMESEnumThe data execution returns duplicate column names.
INTERRUPTEDEnumThe data execution is interrupted.
OTHEREnumOther errors.
TOO_MANY_CHARS_PER_CELLEnumThe data execution returns values that exceed the maximum characters allowed in a single cell.
DATA_NOT_FOUNDEnumThe database referenced by the data source is not found.
PERMISSION_DENIEDEnumThe user does not have access to the database referenced by the data source.

DataExecutionState

Properties

PropertyTypeDescription
DATA_EXECUTION_STATE_UNSUPPORTEDEnumA data execution state is not supported in Apps Script.
RUNNINGEnumThe data execution has started and is running.
SUCCESSEnumThe data execution is completed and successful.
ERROREnumThe data execution is completed and has errors.
NOT_STARTEDEnumThe data execution has not started.

DataExecutionStatus

Methods

MethodReturn typeBrief description
getErrorCode()DataExecutionErrorCodeGets the error code of the data execution.
getErrorMessage()StringGets the error message of the data execution.
getExecutionState()DataExecutionStateGets the state of the data execution.
getLastExecutionTime()DateGets the time the last data execution completed regardless of the execution state.
getLastRefreshedTime()DateGets the time the data last successfully refreshed.
isTruncated()BooleanReturns true if the data from last successful execution is truncated, or false otherwise.

DataSource

Methods

MethodReturn typeBrief description
cancelAllLinkedDataSourceObjectRefreshes()voidCancels all currently running refreshes of data source objects linked to this data source.
createCalculatedColumn(name, formula)DataSourceColumnCreates a calculated column.
createDataSourcePivotTableOnNewSheet()DataSourcePivotTableCreates a data source pivot table from this data source in the first cell of a new sheet.
createDataSourceTableOnNewSheet()DataSourceTableCreates a data source table from this data source in the first cell of a new sheet.
getCalculatedColumnByName(columnName)DataSourceColumnReturns the calculated column in the data source that matches the column name.
getCalculatedColumns()DataSourceColumn[]Returns all the calculated columns in the data source.
getColumns()DataSourceColumn[]Returns all the columns in the data source.
getDataSourceSheets()DataSourceSheet[]Returns the data source sheets associated with this data source.
getSpec()DataSourceSpecGets the data source specification.
refreshAllLinkedDataSourceObjects()voidRefreshes all data source objects linked to the data source.
updateSpec(spec)DataSourceUpdates the data source specification and refreshes the data source objects linked with this data source with the new specification.
updateSpec(spec, refreshAllLinkedObjects)DataSourceUpdates the data source specification and refreshes the linked data source sheets with the new specification.
waitForAllDataExecutionsCompletion(timeoutInSeconds)voidWaits until all the current executions of the linked data source objects complete, timing out after the provided number of seconds.

DataSourceChart

Methods

MethodReturn typeBrief description
cancelDataRefresh()DataSourceChartCancels the data refresh associated with this object if it's currently running.
forceRefreshData()DataSourceChartRefreshes the data of this object regardless of the current state.
getDataSource()DataSourceGets the data source the object is linked to.
getStatus()DataExecutionStatusGets the data execution status of the object.
refreshData()DataSourceChartRefreshes the data of the object.
waitForCompletion(timeoutInSeconds)DataExecutionStatusWaits until the current execution completes, timing out after the provided number of seconds.

DataSourceColumn

Methods

MethodReturn typeBrief description
getDataSource()DataSourceGets the data source associated with the data source column.
getFormula()StringGets the formula for the data source column.
getName()StringGets the name for the data source column.
hasArrayDependency()BooleanReturns whether the column has an array dependency.
isCalculatedColumn()BooleanReturns whether the column is a calculated column.
remove()voidRemoves the data source column.
setFormula(formula)DataSourceColumnSets the formula for the data source column.
setName(name)DataSourceColumnSets the name of the data source column.

DataSourceFormula

Methods

MethodReturn typeBrief description
cancelDataRefresh()DataSourceFormulaCancels the data refresh associated with this object if it's currently running.
forceRefreshData()DataSourceFormulaRefreshes the data of this object regardless of the current state.
getAnchorCell()RangeReturns the Range representing the cell where this data source formula is anchored.
getDataSource()DataSourceGets the data source the object is linked to.
getDisplayValue()StringReturns the display value of the data source formula.
getFormula()StringReturns the formula for this data source formula.
getStatus()DataExecutionStatusGets the data execution status of the object.
refreshData()DataSourceFormulaRefreshes the data of the object.
setFormula(formula)DataSourceFormulaUpdates the formula.
waitForCompletion(timeoutInSeconds)DataExecutionStatusWaits until the current execution completes, timing out after the provided number of seconds.

DataSourceParameter

Methods

MethodReturn typeBrief description
getName()StringGets the parameter name.
getSourceCell()StringGets the source cell the parameter is valued based on, or null if the parameter type is not DataSourceParameterType.CELL.
getType()DataSourceParameterTypeGets the parameter type.

DataSourceParameterType

Properties

PropertyTypeDescription
DATA_SOURCE_PARAMETER_TYPE_UNSUPPORTEDEnumA data source parameter type that is not supported in Apps Script.
CELLEnumThe data source parameter is valued based on a cell.

DataSourcePivotTable

Methods

MethodReturn typeBrief description
addColumnGroup(columnName)PivotGroupAdds a new pivot column group based on the specified data source column.
addFilter(columnName, filterCriteria)PivotFilterAdds a new filter based on the specified data source column with the specified filter criteria.
addPivotValue(columnName)PivotValueAdds a new pivot value based on the specified data source column without any summarize function.
addPivotValue(columnName, summarizeFunction)PivotValueAdds a new pivot value based on the specified data source column with the specified summarize function.
addRowGroup(columnName)PivotGroupAdds a new pivot row group based on the specified data source column.
asPivotTable()PivotTableReturns the data source pivot table as a regular pivot table object.
cancelDataRefresh()DataSourcePivotTableCancels the data refresh associated with this object if it's currently running.
forceRefreshData()DataSourcePivotTableRefreshes the data of this object regardless of the current state.
getDataSource()DataSourceGets the data source the object is linked to.
getStatus()DataExecutionStatusGets the data execution status of the object.
refreshData()DataSourcePivotTableRefreshes the data of the object.
waitForCompletion(timeoutInSeconds)DataExecutionStatusWaits until the current execution completes, timing out after the provided number of seconds.

DataSourceRefreshSchedule

Methods

MethodReturn typeBrief description
getFrequency()DataSourceRefreshScheduleFrequencyGets the refresh schedule frequency, which specifies how often and when to refresh.
getScope()DataSourceRefreshScopeGets the scope of this refresh schedule.
getTimeIntervalOfNextRun()TimeIntervalGets the time window of the next run of this refresh schedule.
isEnabled()BooleanDetermines whether this refresh schedule is enabled.

DataSourceRefreshScheduleFrequency

Methods

MethodReturn typeBrief description
getDaysOfTheMonth()Integer[]Gets the days of the month as numbers (1-28) on which to refresh the data source.
getDaysOfTheWeek()Weekday[]Gets the days of the week on which to refresh the data source.
getFrequencyType()FrequencyTypeGets the frequency type.
getStartHour()IntegerGets the start hour (as a number 0-23) of the time interval during which the refresh schedule runs.

DataSourceRefreshScope

Properties

PropertyTypeDescription
DATA_SOURCE_REFRESH_SCOPE_UNSUPPORTEDEnumThe data source refresh scope is unsupported.
ALL_DATA_SOURCESEnumThe refresh applies to all data sources in the spreadsheet.

DataSourceSheet

Methods

MethodReturn typeBrief description
addFilter(columnName, filterCriteria)DataSourceSheetAdds a filter applied to the data source sheet.
asSheet()SheetReturns the data source sheet as a regular sheet object.
autoResizeColumn(columnName)DataSourceSheetAuto resizes the width of the specified column.
autoResizeColumns(columnNames)DataSourceSheetAuto resizes the width of the specified columns.
cancelDataRefresh()DataSourceSheetCancels the data refresh associated with this object if it's currently running.
forceRefreshData()DataSourceSheetRefreshes the data of this object regardless of the current state.
getColumnWidth(columnName)IntegerReturns the width of the specified column.
getDataSource()DataSourceGets the data source the object is linked to.
getFilters()DataSourceSheetFilter[]Returns all filters applied to the data source sheet.
getSheetValues(columnName)Object[]Returns all the values for the data source sheet for the provided column name.
getSheetValues(columnName, startRow, numRows)Object[]Returns all the values for the data source sheet for the provided column name from the provided start row (based-1) and up to the provided numRows.
getSortSpecs()SortSpec[]Gets all the sort specs in the data source sheet.
getStatus()DataExecutionStatusGets the data execution status of the object.
refreshData()DataSourceSheetRefreshes the data of the object.
removeFilters(columnName)DataSourceSheetRemoves all filters applied to the data source sheet column.
removeSortSpec(columnName)DataSourceSheetRemoves the sort spec on a column in the data source sheet.
setColumnWidth(columnName, width)DataSourceSheetSets the width of the specified column.
setColumnWidths(columnNames, width)DataSourceSheetSets the width of the specified columns.
setSortSpec(columnName, ascending)DataSourceSheetSets the sort spec on a column in the data source sheet.
setSortSpec(columnName, sortOrder)DataSourceSheetSets the sort spec on a column in the data source sheet.
waitForCompletion(timeoutInSeconds)DataExecutionStatusWaits until the current execution completes, timing out after the provided number of seconds.

DataSourceSheetFilter

Methods

MethodReturn typeBrief description
getDataSourceColumn()DataSourceColumnReturns the data source column this filter applies to.
getDataSourceSheet()DataSourceSheetReturns the DataSourceSheet that this filter belongs to.
getFilterCriteria()FilterCriteriaReturns the filter criteria for this filter.
remove()voidRemoves this filter from the data source object.
setFilterCriteria(filterCriteria)DataSourceSheetFilterSets the filter criteria for this filter.

DataSourceSpec

Methods

MethodReturn typeBrief description
asBigQuery()BigQueryDataSourceSpecGets the spec for BigQuery data source.
asLooker()LookerDataSourceSpecGets the spec for Looker data source.
copy()DataSourceSpecBuilderCreates a DataSourceSpecBuilder based on this data source's settings.
getParameters()DataSourceParameter[]Gets the parameters of the data source.
getType()DataSourceTypeGets the type of the data source.

DataSourceSpecBuilder

Methods

MethodReturn typeBrief description
asBigQuery()BigQueryDataSourceSpecBuilderGets the builder for BigQuery data source.
asLooker()LookerDataSourceSpecBuilderGets the builder for Looker data source.
build()DataSourceSpecBuilds a data source specification from the settings in this builder.
copy()DataSourceSpecBuilderCreates a DataSourceSpecBuilder based on this data source's settings.
getParameters()DataSourceParameter[]Gets the parameters of the data source.
getType()DataSourceTypeGets the type of the data source.
removeAllParameters()DataSourceSpecBuilderRemoves all the parameters.
removeParameter(parameterName)DataSourceSpecBuilderRemoves the specified parameter.
setParameterFromCell(parameterName, sourceCell)DataSourceSpecBuilderAdds a parameter, or if the parameter with the name exists, updates its source cell for data source spec builders of type DataSourceType.BIGQUERY.

DataSourceTable

Methods

MethodReturn typeBrief description
addColumns(columnNames)DataSourceTableAdds columns to the data source table.
addFilter(columnName, filterCriteria)DataSourceTableAdds a filter applied to the data source table.
addSortSpec(columnName, ascending)DataSourceTableAdds a sort spec on a column in the data source table.
addSortSpec(columnName, sortOrder)DataSourceTableAdds a sort spec on a column in the data source table.
cancelDataRefresh()DataSourceTableCancels the data refresh associated with this object if it's currently running.
forceRefreshData()DataSourceTableRefreshes the data of this object regardless of the current state.
getColumns()DataSourceTableColumn[]Gets all the data source columns added to the data source table.
getDataSource()DataSourceGets the data source the object is linked to.
getFilters()DataSourceTableFilter[]Returns all filters applied to the data source table.
getRange()RangeGets the Range this data source table spans.
getRowLimit()IntegerReturns the row limit for the data source table.
getSortSpecs()SortSpec[]Gets all the sort specs in the data source table.
getStatus()DataExecutionStatusGets the data execution status of the object.
isSyncingAllColumns()BooleanReturns whether the data source table is syncing all columns in the associated data source.
refreshData()DataSourceTableRefreshes the data of the object.
removeAllColumns()DataSourceTableRemoves all the columns in the data source table.
removeAllSortSpecs()DataSourceTableRemoves all the sort specs in the data source table.
setRowLimit(rowLimit)DataSourceTableUpdates the row limit for the data source table.
syncAllColumns()DataSourceTableSync all current and future columns in the associated data source to the data source table.
waitForCompletion(timeoutInSeconds)DataExecutionStatusWaits until the current execution completes, timing out after the provided number of seconds.

DataSourceTableColumn

Methods

MethodReturn typeBrief description
getDataSourceColumn()DataSourceColumnGets the data source column.
remove()voidRemoves the column from the DataSourceTable.

DataSourceTableFilter

Methods

MethodReturn typeBrief description
getDataSourceColumn()DataSourceColumnReturns the data source column this filter applies to.
getDataSourceTable()DataSourceTableReturns the DataSourceTable that this filter belongs to.
getFilterCriteria()FilterCriteriaReturns the filter criteria for this filter.
remove()voidRemoves this filter from the data source object.
setFilterCriteria(filterCriteria)DataSourceTableFilterSets the filter criteria for this filter.

DataSourceType

Properties

PropertyTypeDescription
DATA_SOURCE_TYPE_UNSUPPORTEDEnumA data source type that is not supported in Apps Script.
BIGQUERYEnumA BigQuery data source.
LOOKEREnumA Looker data source.

DataValidation

Methods

MethodReturn typeBrief description
copy()DataValidationBuilderCreates a builder for a data validation rule based on this rule's settings.
getAllowInvalid()BooleanReturns true if the rule shows a warning when input fails data validation, or false if it rejects the input entirely.
getCriteriaType()DataValidationCriteriaGets the rule's criteria type as defined in the DataValidationCriteria enum.
getCriteriaValues()Object[]Gets an array of arguments for the rule's criteria.
getHelpText()StringGets the rule's help text, or null if no help text is set.

DataValidationBuilder

Methods

MethodReturn typeBrief description
build()DataValidationConstructs a data validation rule from the settings applied to the builder.
copy()DataValidationBuilderCreates a builder for a data validation rule based on this rule's settings.
getAllowInvalid()BooleanReturns true if the rule shows a warning when input fails data validation, or false if it rejects the input entirely.
getCriteriaType()DataValidationCriteriaGets the rule's criteria type as defined in the DataValidationCriteria enum.
getCriteriaValues()Object[]Gets an array of arguments for the rule's criteria.
getHelpText()StringGets the rule's help text, or null if no help text is set.
requireCheckbox()DataValidationBuilderSets the data validation rule to require that the input is a boolean value; this value is rendered as a checkbox.
requireCheckbox(checkedValue)DataValidationBuilderSets the data validation rule to require that the input is the specified value or blank.
requireCheckbox(checkedValue, uncheckedValue)DataValidationBuilderSets the data validation rule to require that the input is one of the specified values.
requireDate()DataValidationBuilderSets the data validation rule to require a date.
requireDateAfter(date)DataValidationBuilderSets the data validation rule to require a date after the given value.
requireDateBefore(date)DataValidationBuilderSets the data validation rule to require a date before the given value.
requireDateBetween(start, end)DataValidationBuilderSets the data validation rule to require a date that falls between, or is either of, two specified dates.
requireDateEqualTo(date)DataValidationBuilderSets the data validation rule to require a date equal to the given value.
requireDateNotBetween(start, end)DataValidationBuilderSets the data validation rule to require a date that does not fall between, and is neither of, two specified dates.
requireDateOnOrAfter(date)DataValidationBuilderSets the data validation rule to require a date on or after the given value.
requireDateOnOrBefore(date)DataValidationBuilderSets the data validation rule to require a date on or before the given value.
requireFormulaSatisfied(formula)DataValidationBuilderSets the data validation rule to require that the given formula evaluates to true.
requireNumberBetween(start, end)DataValidationBuilderSets the data validation rule to require a number that falls between, or is either of, two specified numbers.
requireNumberEqualTo(number)DataValidationBuilderSets the data validation rule to require a number equal to the given value.
requireNumberGreaterThan(number)DataValidationBuilderSets the data validation rule to require a number greater than the given value.
requireNumberGreaterThanOrEqualTo(number)DataValidationBuilderSets the data validation rule to require a number greater than or equal to the given value.
requireNumberLessThan(number)DataValidationBuilderSets the data validation rule to require a number less than the given value.
requireNumberLessThanOrEqualTo(number)DataValidationBuilderSets the data validation rule to require a number less than or equal to the given value.
requireNumberNotBetween(start, end)DataValidationBuilderSets the data validation rule to require a number that does not fall between, and is neither of, two specified numbers.
requireNumberNotEqualTo(number)DataValidationBuilderSets the data validation rule to require a number not equal to the given value.
requireTextContains(text)DataValidationBuilderSets the data validation rule to require that the input contains the given value.
requireTextDoesNotContain(text)DataValidationBuilderSets the data validation rule to require that the input does not contain the given value.
requireTextEqualTo(text)DataValidationBuilderSets the data validation rule to require that the input is equal to the given value.
requireTextIsEmail()DataValidationBuilderSets the data validation rule to require that the input is in the form of an email address.
requireTextIsUrl()DataValidationBuilderSets the data validation rule to require that the input is in the form of a URL.
requireValueInList(values)DataValidationBuilderSets the data validation rule to require that the input is equal to one of the given values.
requireValueInList(values, showDropdown)DataValidationBuilderSets the data validation rule to require that the input is equal to one of the given values, with an option to hide the dropdown menu.
requireValueInRange(range)DataValidationBuilderSets the data validation rule to require that the input is equal to a value in the given range.
requireValueInRange(range, showDropdown)DataValidationBuilderSets the data validation rule to require that the input is equal to a value in the given range, with an option to hide the dropdown menu.
setAllowInvalid(allowInvalidData)DataValidationBuilderSets whether to show a warning when input fails data validation or whether to reject the input entirely.
setHelpText(helpText)DataValidationBuilderSets the help text that appears when the user hovers over the cell on which data validation is set.
withCriteria(criteria, args)DataValidationBuilderSets the data validation rule to criteria defined by DataValidationCriteria values, typically taken from the criteria and arguments of an existing rule.

DataValidationCriteria

Properties

PropertyTypeDescription
DATE_AFTEREnumRequires a date that is after the given value.
DATE_BEFOREEnumRequires a date that is before the given value.
DATE_BETWEENEnumRequires a date that is between the given values.
DATE_EQUAL_TOEnumRequires a date that is equal to the given value.
DATE_IS_VALID_DATEEnumRequires a date.
DATE_NOT_BETWEENEnumRequires a date that is not between the given values.
DATE_ON_OR_AFTEREnumRequire a date that is on or after the given value.
DATE_ON_OR_BEFOREEnumRequires a date that is on or before the given value.
NUMBER_BETWEENEnumRequires a number that is between the given values.
NUMBER_EQUAL_TOEnumRequires a number that is equal to the given value.
NUMBER_GREATER_THANEnumRequire a number that is greater than the given value.
NUMBER_GREATER_THAN_OR_EQUAL_TOEnumRequires a number that is greater than or equal to the given value.
NUMBER_LESS_THANEnumRequires a number that is less than the given value.
NUMBER_LESS_THAN_OR_EQUAL_TOEnumRequires a number that is less than or equal to the given value.
NUMBER_NOT_BETWEENEnumRequires a number that is not between the given values.
NUMBER_NOT_EQUAL_TOEnumRequires a number that is not equal to the given value.
TEXT_CONTAINSEnumRequires that the input contains the given value.
TEXT_DOES_NOT_CONTAINEnumRequires that the input does not contain the given value.
TEXT_EQUAL_TOEnumRequires that the input is equal to the given value.
TEXT_IS_VALID_EMAILEnumRequires that the input is in the form of an email address.
TEXT_IS_VALID_URLEnumRequires that the input is in the form of a URL.
VALUE_IN_LISTEnumRequires that the input is equal to one of the given values.
VALUE_IN_RANGEEnumRequires that the input is equal to a value in the given range.
CUSTOM_FORMULAEnumRequires that the input makes the given formula evaluate to true.
CHECKBOXEnumRequires that the input is a custom value or a boolean; rendered as a checkbox.

DateTimeGroupingRule

Methods

MethodReturn typeBrief description
getRuleType()DateTimeGroupingRuleTypeGets the type of the date-time grouping rule.

DateTimeGroupingRuleType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA date-time grouping rule type that is not supported.
SECONDEnumGroup date-time by second, from 0 to 59.
MINUTEEnumGroup date-time by minute, from 0 to 59.
HOUREnumGroup date-time by hour using a 24-hour system, from 0 to 23.
HOUR_MINUTEEnumGroup date-time by hour and minute using a 24-hour system, for example 19:45.
HOUR_MINUTE_AMPMEnumGroup date-time by hour and minute using a 12-hour system, for example 7:45 PM.
DAY_OF_WEEKEnumGroup date-time by day of week, for example Sunday.
DAY_OF_YEAREnumGroup date-time by day of year, from 1 to 366.
DAY_OF_MONTHEnumGroup date-time by day of month, from 1 to 31.
DAY_MONTHEnumGroup date-time by day and month, for example 22-Nov.
MONTHEnumGroup date-time by month, for example Nov.
QUARTEREnumGroup date-time by quarter, for example Q1 (which represents Jan-Mar).
YEAREnumGroup date-time by year, for example 2008.
YEAR_MONTHEnumGroup date-time by year and month, for example 2008-Nov.
YEAR_QUARTEREnumGroup date-time by year and quarter, for example 2008 Q4 .
YEAR_MONTH_DAYEnumGroup date-time by year, month, and day, for example 2008-11-22.

DeveloperMetadata

Methods

MethodReturn typeBrief description
getId()IntegerReturns the unique ID associated with this developer metadata.
getKey()StringReturns the key associated with this developer metadata.
getLocation()DeveloperMetadataLocationReturns the location of this developer metadata.
getValue()StringReturns the value associated with this developer metadata, or null if this metadata has no value.
getVisibility()DeveloperMetadataVisibilityReturns the visibility of this developer metadata.
moveToColumn(column)DeveloperMetadataMoves this developer metadata to the specified column.
moveToRow(row)DeveloperMetadataMoves this developer metadata to the specified row.
moveToSheet(sheet)DeveloperMetadataMoves this developer metadata to the specified sheet.
moveToSpreadsheet()DeveloperMetadataMoves this developer metadata to the top-level spreadsheet.
remove()voidDeletes this metadata.
setKey(key)DeveloperMetadataSets the key of this developer metadata to the specified value.
setValue(value)DeveloperMetadataSets the value associated with this developer metadata to the specified value.
setVisibility(visibility)DeveloperMetadataSets the visibility of this developer metadata to the specified visibility.

DeveloperMetadataFinder

Methods

MethodReturn typeBrief description
find()DeveloperMetadata[]Executes this search and returns the matching metadata.
onIntersectingLocations()DeveloperMetadataFinderConfigures the search to consider intersecting locations that have metadata.
withId(id)DeveloperMetadataFinderLimits this search to consider only metadata that match the specified ID.
withKey(key)DeveloperMetadataFinderLimits this search to consider only metadata that match the specified key.
withLocationType(locationType)DeveloperMetadataFinderLimits this search to consider only metadata that match the specified location type.
withValue(value)DeveloperMetadataFinderLimits this search to consider only metadata that match the specified value.
withVisibility(visibility)DeveloperMetadataFinderLimits this search to consider only metadata that match the specified visibility.

DeveloperMetadataLocation

Methods

MethodReturn typeBrief description
getColumn()RangeReturns the Range for the column location of this metadata, or null if the location type is not DeveloperMetadataLocationType.COLUMN.
getLocationType()DeveloperMetadataLocationTypeGets the type of location.
getRow()RangeReturns the Range for the row location of this metadata, or null if the location type is not DeveloperMetadataLocationType.ROW.
getSheet()SheetReturns the Sheet location of this metadata, or null if the location type is not DeveloperMetadataLocationType.SHEET.
getSpreadsheet()SpreadsheetReturns the Spreadsheet location of this metadata, or null if the location type is not DeveloperMetadataLocationType.SPREADSHEET.

DeveloperMetadataLocationType

Properties

PropertyTypeDescription
SPREADSHEETEnumThe location type for developer metadata associated with the top-level spreadsheet.
SHEETEnumThe location type for developer metadata associated with a whole sheet.
ROWEnumThe location type for developer metadata associated with a row.
COLUMNEnumThe location type for developer metadata associated with a column.

DeveloperMetadataVisibility

Properties

PropertyTypeDescription
DOCUMENTEnumDocument-visible metadata is accessible from any developer project with access to the document.
PROJECTEnumProject-visible metadata is only visible to and accessible by the developer project that created the metadata.

Dimension

Properties

PropertyTypeDescription
COLUMNSEnumThe column (vertical) dimension.
ROWSEnumThe row (horizontal) dimension.

Direction

Properties

PropertyTypeDescription
UPEnumThe direction of decreasing row indices.
DOWNEnumThe direction of increasing row indices.
PREVIOUSEnumThe direction of decreasing column indices.
NEXTEnumThe direction of increasing column indices.

Drawing

Methods

MethodReturn typeBrief description
getContainerInfo()ContainerInfoGets information about where the drawing is positioned in the sheet.
getHeight()IntegerReturns the actual height of this drawing in pixels.
getOnAction()StringReturns the name of the macro attached to this drawing.
getSheet()SheetReturns the sheet this drawing appears on.
getWidth()IntegerReturns the actual width of this drawing in pixels.
getZIndex()NumberReturns the z-index of this drawing.
remove()voidDeletes this drawing from the spreadsheet.
setHeight(height)DrawingSets the actual height of this drawing in pixels.
setOnAction(macroName)DrawingAssigns a macro function to this drawing.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)DrawingSets the position where the drawing appears on the sheet.
setWidth(width)DrawingSets the actual width of this drawing in pixels.
setZIndex(zIndex)DrawingSets the z-index of this drawing.

EmbeddedAreaChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
reverseCategories()EmbeddedAreaChartBuilderReverses the drawing of series in the domain axis.
setBackgroundColor(cssValue)EmbeddedAreaChartBuilderSets the background color for the chart.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setColors(cssValues)EmbeddedAreaChartBuilderSets the colors for the lines in the chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setLegendPosition(position)EmbeddedAreaChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)EmbeddedAreaChartBuilderSets the text style of the chart legend.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPointStyle(style)EmbeddedAreaChartBuilderSets the style for points in the line.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setRange(start, end)EmbeddedAreaChartBuilderSets the range for the chart.
setStacked()EmbeddedAreaChartBuilderUses stacked lines, meaning that line and bar values are stacked (accumulated).
setTitle(chartTitle)EmbeddedAreaChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)EmbeddedAreaChartBuilderSets the text style of the chart title.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.
setXAxisTextStyle(textStyle)EmbeddedAreaChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)EmbeddedAreaChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)EmbeddedAreaChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)EmbeddedAreaChartBuilderSets the vertical axis text style.
setYAxisTitle(title)EmbeddedAreaChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)EmbeddedAreaChartBuilderSets the vertical axis title text style.
useLogScale()EmbeddedAreaChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

EmbeddedBarChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
reverseCategories()EmbeddedBarChartBuilderReverses the drawing of series in the domain axis.
reverseDirection()EmbeddedBarChartBuilderReverses the direction in which the bars grow along the horizontal axis.
setBackgroundColor(cssValue)EmbeddedBarChartBuilderSets the background color for the chart.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setColors(cssValues)EmbeddedBarChartBuilderSets the colors for the lines in the chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setLegendPosition(position)EmbeddedBarChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)EmbeddedBarChartBuilderSets the text style of the chart legend.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setRange(start, end)EmbeddedBarChartBuilderSets the range for the chart.
setStacked()EmbeddedBarChartBuilderUses stacked lines, meaning that line and bar values are stacked (accumulated).
setTitle(chartTitle)EmbeddedBarChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)EmbeddedBarChartBuilderSets the text style of the chart title.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.
setXAxisTextStyle(textStyle)EmbeddedBarChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)EmbeddedBarChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)EmbeddedBarChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)EmbeddedBarChartBuilderSets the vertical axis text style.
setYAxisTitle(title)EmbeddedBarChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)EmbeddedBarChartBuilderSets the vertical axis title text style.
useLogScale()EmbeddedBarChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

EmbeddedChart

Methods

MethodReturn typeBrief description
asDataSourceChart()DataSourceChartCasts to a data source chart instance if the chart is a data source chart, or null otherwise.
getAs(contentType)BlobReturn the data inside this object as a blob converted to the specified content type.
getBlob()BlobReturn the data inside this object as a blob.
getChartId()IntegerReturns a stable identifier for the chart that is unique across the spreadsheet containing the chart or null if the chart is not in a spreadsheet.
getContainerInfo()ContainerInfoReturns information about where the chart is positioned within a sheet.
getHiddenDimensionStrategy()ChartHiddenDimensionStrategyReturns the strategy to use for handling hidden rows and columns.
getMergeStrategy()ChartMergeStrategyReturns the merge strategy used when more than one range exists.
getNumHeaders()IntegerReturns the number of rows or columns the range that are treated as headers.
getOptions()ChartOptionsReturns the options for this chart, such as height, colors, and axes.
getRanges()Range[]Returns the ranges that this chart uses as a data source.
getTransposeRowsAndColumns()BooleanIf true, the rows and columns used to populate the chart are switched.
modify()EmbeddedChartBuilderReturns an EmbeddedChartBuilder that can be used to modify this chart.

EmbeddedChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.

EmbeddedColumnChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
reverseCategories()EmbeddedColumnChartBuilderReverses the drawing of series in the domain axis.
setBackgroundColor(cssValue)EmbeddedColumnChartBuilderSets the background color for the chart.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setColors(cssValues)EmbeddedColumnChartBuilderSets the colors for the lines in the chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setLegendPosition(position)EmbeddedColumnChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)EmbeddedColumnChartBuilderSets the text style of the chart legend.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setRange(start, end)EmbeddedColumnChartBuilderSets the range for the chart.
setStacked()EmbeddedColumnChartBuilderUses stacked lines, meaning that line and bar values are stacked (accumulated).
setTitle(chartTitle)EmbeddedColumnChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)EmbeddedColumnChartBuilderSets the text style of the chart title.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.
setXAxisTextStyle(textStyle)EmbeddedColumnChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)EmbeddedColumnChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)EmbeddedColumnChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)EmbeddedColumnChartBuilderSets the vertical axis text style.
setYAxisTitle(title)EmbeddedColumnChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)EmbeddedColumnChartBuilderSets the vertical axis title text style.
useLogScale()EmbeddedColumnChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

EmbeddedComboChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
reverseCategories()EmbeddedComboChartBuilderReverses the drawing of series in the domain axis.
setBackgroundColor(cssValue)EmbeddedComboChartBuilderSets the background color for the chart.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setColors(cssValues)EmbeddedComboChartBuilderSets the colors for the lines in the chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setLegendPosition(position)EmbeddedComboChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)EmbeddedComboChartBuilderSets the text style of the chart legend.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setRange(start, end)EmbeddedComboChartBuilderSets the range for the chart.
setStacked()EmbeddedComboChartBuilderUses stacked lines, meaning that line and bar values are stacked (accumulated).
setTitle(chartTitle)EmbeddedComboChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)EmbeddedComboChartBuilderSets the text style of the chart title.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.
setXAxisTextStyle(textStyle)EmbeddedComboChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)EmbeddedComboChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)EmbeddedComboChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)EmbeddedComboChartBuilderSets the vertical axis text style.
setYAxisTitle(title)EmbeddedComboChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)EmbeddedComboChartBuilderSets the vertical axis title text style.
useLogScale()EmbeddedComboChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

EmbeddedHistogramChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
reverseCategories()EmbeddedHistogramChartBuilderReverses the drawing of series in the domain axis.
setBackgroundColor(cssValue)EmbeddedHistogramChartBuilderSets the background color for the chart.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setColors(cssValues)EmbeddedHistogramChartBuilderSets the colors for the lines in the chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setLegendPosition(position)EmbeddedHistogramChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)EmbeddedHistogramChartBuilderSets the text style of the chart legend.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setRange(start, end)EmbeddedHistogramChartBuilderSets the range for the chart.
setStacked()EmbeddedHistogramChartBuilderUses stacked lines, meaning that line and bar values are stacked (accumulated).
setTitle(chartTitle)EmbeddedHistogramChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)EmbeddedHistogramChartBuilderSets the text style of the chart title.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.
setXAxisTextStyle(textStyle)EmbeddedHistogramChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)EmbeddedHistogramChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)EmbeddedHistogramChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)EmbeddedHistogramChartBuilderSets the vertical axis text style.
setYAxisTitle(title)EmbeddedHistogramChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)EmbeddedHistogramChartBuilderSets the vertical axis title text style.
useLogScale()EmbeddedHistogramChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

EmbeddedLineChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
reverseCategories()EmbeddedLineChartBuilderReverses the drawing of series in the domain axis.
setBackgroundColor(cssValue)EmbeddedLineChartBuilderSets the background color for the chart.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setColors(cssValues)EmbeddedLineChartBuilderSets the colors for the lines in the chart.
setCurveStyle(style)EmbeddedLineChartBuilderSets the style to use for curves in the chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setLegendPosition(position)EmbeddedLineChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)EmbeddedLineChartBuilderSets the text style of the chart legend.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPointStyle(style)EmbeddedLineChartBuilderSets the style for points in the line.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setRange(start, end)EmbeddedLineChartBuilderSets the range for the chart.
setTitle(chartTitle)EmbeddedLineChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)EmbeddedLineChartBuilderSets the text style of the chart title.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.
setXAxisTextStyle(textStyle)EmbeddedLineChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)EmbeddedLineChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)EmbeddedLineChartBuilderSets the horizontal axis title text style.
setYAxisTextStyle(textStyle)EmbeddedLineChartBuilderSets the vertical axis text style.
setYAxisTitle(title)EmbeddedLineChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)EmbeddedLineChartBuilderSets the vertical axis title text style.
useLogScale()EmbeddedLineChartBuilderMakes the range axis into a logarithmic scale (requires all values to be positive).

EmbeddedPieChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
reverseCategories()EmbeddedPieChartBuilderReverses the drawing of series in the domain axis.
set3D()EmbeddedPieChartBuilderSets the chart to be three-dimensional.
setBackgroundColor(cssValue)EmbeddedPieChartBuilderSets the background color for the chart.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setColors(cssValues)EmbeddedPieChartBuilderSets the colors for the lines in the chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setLegendPosition(position)EmbeddedPieChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)EmbeddedPieChartBuilderSets the text style of the chart legend.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setTitle(chartTitle)EmbeddedPieChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)EmbeddedPieChartBuilderSets the text style of the chart title.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.

EmbeddedScatterChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
setBackgroundColor(cssValue)EmbeddedScatterChartBuilderSets the background color for the chart.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setColors(cssValues)EmbeddedScatterChartBuilderSets the colors for the lines in the chart.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setLegendPosition(position)EmbeddedScatterChartBuilderSets the position of the legend with respect to the chart.
setLegendTextStyle(textStyle)EmbeddedScatterChartBuilderSets the text style of the chart legend.
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPointStyle(style)EmbeddedScatterChartBuilderSets the style for points in the line.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setTitle(chartTitle)EmbeddedScatterChartBuilderSets the title of the chart.
setTitleTextStyle(textStyle)EmbeddedScatterChartBuilderSets the text style of the chart title.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.
setXAxisLogScale()EmbeddedScatterChartBuilderMakes the horizontal axis into a logarithmic scale (requires all values to be positive).
setXAxisRange(start, end)EmbeddedScatterChartBuilderSets the range for the horizontal axis of the chart.
setXAxisTextStyle(textStyle)EmbeddedScatterChartBuilderSets the horizontal axis text style.
setXAxisTitle(title)EmbeddedScatterChartBuilderAdds a title to the horizontal axis.
setXAxisTitleTextStyle(textStyle)EmbeddedScatterChartBuilderSets the horizontal axis title text style.
setYAxisLogScale()EmbeddedScatterChartBuilderMakes the vertical axis into a logarithmic scale (requires all values to be positive).
setYAxisRange(start, end)EmbeddedScatterChartBuilderSets the range for the vertical axis of the chart.
setYAxisTextStyle(textStyle)EmbeddedScatterChartBuilderSets the vertical axis text style.
setYAxisTitle(title)EmbeddedScatterChartBuilderAdds a title to the vertical axis.
setYAxisTitleTextStyle(textStyle)EmbeddedScatterChartBuilderSets the vertical axis title text style.

EmbeddedTableChartBuilder

Methods

MethodReturn typeBrief description
addRange(range)EmbeddedChartBuilderAdds a range to the chart this builder modifies.
asAreaChart()EmbeddedAreaChartBuilderSets the chart type to AreaChart and returns an EmbeddedAreaChartBuilder.
asBarChart()EmbeddedBarChartBuilderSets the chart type to BarChart and returns an EmbeddedBarChartBuilder.
asColumnChart()EmbeddedColumnChartBuilderSets the chart type to ColumnChart and returns an EmbeddedColumnChartBuilder.
asComboChart()EmbeddedComboChartBuilderSets the chart type to ComboChart and returns an EmbeddedComboChartBuilder.
asHistogramChart()EmbeddedHistogramChartBuilderSets the chart type to HistogramChart and returns an EmbeddedHistogramChartBuilder.
asLineChart()EmbeddedLineChartBuilderSets the chart type to LineChart and returns an EmbeddedLineChartBuilder.
asPieChart()EmbeddedPieChartBuilderSets the chart type to PieChart and returns an EmbeddedPieChartBuilder.
asScatterChart()EmbeddedScatterChartBuilderSets the chart type to ScatterChart and returns an EmbeddedScatterChartBuilder.
asTableChart()EmbeddedTableChartBuilderSets the chart type to TableChart and returns an EmbeddedTableChartBuilder.
build()EmbeddedChartBuilds the chart to reflect all changes made to it.
clearRanges()EmbeddedChartBuilderRemoves all ranges from the chart this builder modifies.
enablePaging(enablePaging)EmbeddedTableChartBuilderSets whether to enable paging through the data.
enablePaging(pageSize)EmbeddedTableChartBuilderEnables paging and sets the number of rows in each page.
enablePaging(pageSize, startPage)EmbeddedTableChartBuilderEnables paging, sets the number of rows in each page and the first table page to display (page numbers are zero based).
enableRtlTable(rtlEnabled)EmbeddedTableChartBuilderAdds basic support for right-to-left languages (such as Arabic or Hebrew) by reversing the column order of the table, so that column zero is the right-most column, and the last column is the left-most column.
enableSorting(enableSorting)EmbeddedTableChartBuilderSets whether to sort columns when the user clicks a column heading.
getChartType()ChartTypeReturns the current chart type.
getContainer()ContainerInfoReturn the chart ContainerInfo, which encapsulates where the chart appears on the sheet.
getRanges()Range[]Returns a copy of the list of ranges currently providing data for this chart.
removeRange(range)EmbeddedChartBuilderRemoves the specified range from the chart this builder modifies.
setChartType(type)EmbeddedChartBuilderChanges the type of chart.
setFirstRowNumber(number)EmbeddedTableChartBuilderSets the row number for the first row in the data table.
setHiddenDimensionStrategy(strategy)EmbeddedChartBuilderSets the strategy to use for hidden rows and columns.
setInitialSortingAscending(column)EmbeddedTableChartBuilderSets the index of the column according to which the table should be initially sorted (ascending).
setInitialSortingDescending(column)EmbeddedTableChartBuilderSets the index of the column according to which the table should be initially sorted (descending).
setMergeStrategy(mergeStrategy)EmbeddedChartBuilderSets the merge strategy to use when more than one range exists.
setNumHeaders(headers)EmbeddedChartBuilderSets the number of rows or columns of the range that should be treated as headers.
setOption(option, value)EmbeddedChartBuilderSets advanced options for this chart.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)EmbeddedChartBuilderSets the position, changing where the chart appears on the sheet.
setTransposeRowsAndColumns(transpose)EmbeddedChartBuilderSets whether the chart's rows and columns are transposed.
showRowNumberColumn(showRowNumber)EmbeddedTableChartBuilderSets whether to show the row number as the first column of the table.
useAlternatingRowStyle(alternate)EmbeddedTableChartBuilderSets whether alternating color style is assigned to odd and even rows of a table chart.

Filter

Methods

MethodReturn typeBrief description
getColumnFilterCriteria(columnPosition)FilterCriteriaGets the filter criteria on the specified column, or null if the column doesn't have filter criteria applied to it.
getRange()RangeGets the range this filter applies to.
remove()voidRemoves this filter.
removeColumnFilterCriteria(columnPosition)FilterRemoves the filter criteria from the specified column.
setColumnFilterCriteria(columnPosition, filterCriteria)FilterSets the filter criteria on the specified column.
sort(columnPosition, ascending)FilterSorts the filtered range by the specified column, excluding the first row (the header row) in the range this filter applies to.

FilterCriteria

Methods

MethodReturn typeBrief description
copy()FilterCriteriaBuilderCopies this filter criteria and creates a criteria builder that you can apply to another filter.
getCriteriaType()BooleanCriteriaReturns the criteria's boolean type, for example, CELL_EMPTY.
getCriteriaValues()Object[]Returns an array of arguments for boolean criteria.
getHiddenValues()String[]Returns the values that the filter hides.
getVisibleBackgroundColor()ColorReturns the background color used as filter criteria.
getVisibleForegroundColor()ColorReturns the foreground color used as a filter criteria.
getVisibleValues()String[]Returns the values that the pivot table filter shows.

FilterCriteriaBuilder

Methods

MethodReturn typeBrief description
build()FilterCriteriaAssembles the filter criteria using the settings you add to the criteria builder.
copy()FilterCriteriaBuilderCopies this filter criteria and creates a criteria builder that you can apply to another filter.
getCriteriaType()BooleanCriteriaReturns the criteria's boolean type, for example, CELL_EMPTY.
getCriteriaValues()Object[]Returns an array of arguments for boolean criteria.
getHiddenValues()String[]Returns the values that the filter hides.
getVisibleBackgroundColor()ColorReturns the background color used as filter criteria.
getVisibleForegroundColor()ColorReturns the foreground color used as a filter criteria.
getVisibleValues()String[]Returns the values that the pivot table filter shows.
setHiddenValues(values)FilterCriteriaBuilderSets the values to hide.
setVisibleBackgroundColor(visibleBackgroundColor)FilterCriteriaBuilderSets the background color used as filter criteria.
setVisibleForegroundColor(visibleForegroundColor)FilterCriteriaBuilderSets the foreground color used as filter criteria.
setVisibleValues(values)FilterCriteriaBuilderSets the values to show on a pivot table.
whenCellEmpty()FilterCriteriaBuilderSets the filter criteria to show empty cells.
whenCellNotEmpty()FilterCriteriaBuilderSets the filter criteria to show cells that aren't empty.
whenDateAfter(date)FilterCriteriaBuilderSets filter criteria that shows cells with dates that are after the specified date.
whenDateAfter(date)FilterCriteriaBuilderSets filter criteria that shows cells with dates that are after the specified relative date.
whenDateBefore(date)FilterCriteriaBuilderSets filter criteria that shows cells with dates that are before the specified date.
whenDateBefore(date)FilterCriteriaBuilderSets filter criteria that shows cells with dates that are before the specified relative date.
whenDateEqualTo(date)FilterCriteriaBuilderSets filter criteria that shows cells with dates that are equal to the specified date.
whenDateEqualTo(date)FilterCriteriaBuilderSets filter criteria that shows cells with dates that are equal to the specified relative date.
whenDateEqualToAny(dates)FilterCriteriaBuilderSets the filter criteria to show cells with dates that are equal to any of the specified dates.
whenDateNotEqualTo(date)FilterCriteriaBuilderSets the filter criteria to show cells that aren't equal to the specified date.
whenDateNotEqualToAny(dates)FilterCriteriaBuilderSets the filter criteria to show cells with dates that aren't equal to any of the specified dates.
whenFormulaSatisfied(formula)FilterCriteriaBuilderSets the filter criteria to show cells with a specified formula (such as =B:B<C:C) that evaluates to true.
whenNumberBetween(start, end)FilterCriteriaBuilderSets the filter criteria to show cells with a number that falls between, or is either of, 2 specified numbers.
whenNumberEqualTo(number)FilterCriteriaBuilderSets the filter criteria to show cells with a number that's equal to the specified number.
whenNumberEqualToAny(numbers)FilterCriteriaBuilderSets the filter criteria to show cells with a number that's equal to any of the specified numbers.
whenNumberGreaterThan(number)FilterCriteriaBuilderSets the filter criteria to show cells with a number greater than the specified number
whenNumberGreaterThanOrEqualTo(number)FilterCriteriaBuilderSets the filter criteria to show cells with a number greater than or equal to the specified number.
whenNumberLessThan(number)FilterCriteriaBuilderSets the filter criteria to show cells with a number that's less than the specified number.
whenNumberLessThanOrEqualTo(number)FilterCriteriaBuilderSets the filter criteria to show cells with a number less than or equal to the specified number.
whenNumberNotBetween(start, end)FilterCriteriaBuilderSets the filter criteria to show cells with a number doesn't fall between, and is neither of, 2 specified numbers.
whenNumberNotEqualTo(number)FilterCriteriaBuilderSets the filter criteria to show cells with a number that isn't equal to the specified number.
whenNumberNotEqualToAny(numbers)FilterCriteriaBuilderSets the filter criteria to show cells with a number that isn't equal to any of the specified numbers.
whenTextContains(text)FilterCriteriaBuilderSets the filter criteria to show cells with text that contains the specified text.
whenTextDoesNotContain(text)FilterCriteriaBuilderSets the filter criteria to show cells with text that doesn't contain the specified text.
whenTextEndsWith(text)FilterCriteriaBuilderSets the filter criteria to show cells with text that ends with the specified text.
whenTextEqualTo(text)FilterCriteriaBuilderSets the filter criteria to show cells with text that's equal to the specified text.
whenTextEqualToAny(texts)FilterCriteriaBuilderSets the filter criteria to show cells with text that's equal to any of the specified text values.
whenTextNotEqualTo(text)FilterCriteriaBuilderSets the filter criteria to show cells with text that isn't equal to the specified text.
whenTextNotEqualToAny(texts)FilterCriteriaBuilderSets the filter criteria to show cells with text that isn't equal to any of the specified values.
whenTextStartsWith(text)FilterCriteriaBuilderSets the filter criteria to show cells with text that starts with the specified text.
withCriteria(criteria, args)FilterCriteriaBuilderSets the filter criteria to a boolean condition defined by BooleanCriteria values, such as CELL_EMPTY or NUMBER_GREATER_THAN.

FrequencyType

Properties

PropertyTypeDescription
FREQUENCY_TYPE_UNSUPPORTEDEnumThe frequency type is unsupported.
DAILYEnumRefresh daily.
WEEKLYEnumRefresh weekly, on given days of the week.
MONTHLYEnumRefresh monthly, on given days of the month.

GradientCondition

Methods

MethodReturn typeBrief description
getMaxColorObject()ColorGets the color set for the maximum value of this gradient condition.
getMaxType()InterpolationTypeGets the interpolation type for the maximum value of this gradient condition.
getMaxValue()StringGets the max value of this gradient condition.
getMidColorObject()ColorGets the color set for the midpoint value of this gradient condition.
getMidType()InterpolationTypeGets the interpolation type for the mid-point value of this gradient condition.
getMidValue()StringGets the mid-point value of this gradient condition.
getMinColorObject()ColorGets the color set for the minimum value of this gradient condition.
getMinType()InterpolationTypeGets the interpolation type for the minimum value of this gradient condition.
getMinValue()StringGets the minimum value of this gradient condition.

Group

Methods

MethodReturn typeBrief description
collapse()GroupCollapses this group.
expand()GroupExpands this group.
getControlIndex()IntegerReturns the control toggle index of this group.
getDepth()IntegerReturns the depth of this group.
getRange()RangeReturns the range over which this group exists.
isCollapsed()BooleanReturns true if this group is collapsed.
remove()voidRemoves this group from the sheet, reducing the group depth of the range by one.

GroupControlTogglePosition

Properties

PropertyTypeDescription
BEFOREEnumThe position where the control toggle is before the group (at lower indices).
AFTEREnumThe position where the control toggle is after the group (at higher indices).

InterpolationType

Properties

PropertyTypeDescription
NUMBEREnumUse the number as as specific interpolation point for a gradient condition.
PERCENTEnumUse the number as a percentage interpolation point for a gradient condition.
PERCENTILEEnumUse the number as a percentile interpolation point for a gradient condition.
MINEnumInfer the minimum number as a specific interpolation point for a gradient condition.
MAXEnumInfer the maximum number as a specific interpolation point for a gradient condition.

LookerDataSourceSpec

Methods

MethodReturn typeBrief description
copy()DataSourceSpecBuilderCreates a DataSourceSpecBuilder based on this data source's settings.
getExploreName()StringGets the name of the Looker explore in the model.
getInstanceUrl()StringGets the URL of the Looker instance.
getModelName()StringGets the name of the Looker model in the instance.
getParameters()DataSourceParameter[]Gets the parameters of the data source.
getType()DataSourceTypeGets the type of the data source.

LookerDataSourceSpecBuilder

Methods

MethodReturn typeBrief description
build()DataSourceSpecBuilds a data source specification from the settings in this builder.
copy()DataSourceSpecBuilderCreates a DataSourceSpecBuilder based on this data source's settings.
getExploreName()StringGets the name of the Looker explore in the model.
getInstanceUrl()StringGets the URL of the Looker instance.
getModelName()StringGets the name of the Looker model in the instance.
getParameters()DataSourceParameter[]Gets the parameters of the data source.
getType()DataSourceTypeGets the type of the data source.
removeAllParameters()LookerDataSourceSpecBuilderRemoves all the parameters.
removeParameter(parameterName)LookerDataSourceSpecBuilderRemoves the specified parameter.
setExploreName(exploreName)LookerDataSourceSpecBuilderSets the explore name in the Looker model.
setInstanceUrl(instanceUrl)LookerDataSourceSpecBuilderSets the instance URL for Looker.
setModelName(modelName)LookerDataSourceSpecBuilderSets the Looker model name in the Looker instance.
setParameterFromCell(parameterName, sourceCell)LookerDataSourceSpecBuilderAdds a parameter, or if the parameter with the name exists, updates its source cell for data source spec builders of type DataSourceType.BIGQUERY.

NamedRange

Methods

MethodReturn typeBrief description
getName()StringGets the name of this named range.
getRange()RangeGets the range referenced by this named range.
remove()voidDeletes this named range.
setName(name)NamedRangeSets/updates the name of the named range.
setRange(range)NamedRangeSets/updates the range for this named range.

OverGridImage

Methods

MethodReturn typeBrief description
assignScript(functionName)OverGridImageAssigns the function with the specified function name to this image.
getAltTextDescription()StringReturns the alt text description for this image.
getAltTextTitle()StringReturns the alt text title for this image.
getAnchorCell()RangeReturns the cell where an image is anchored.
getAnchorCellXOffset()IntegerReturns the horizontal pixel offset from the anchor cell.
getAnchorCellYOffset()IntegerReturns the vertical pixel offset from the anchor cell.
getHeight()IntegerReturns the actual height of this image in pixels.
getInherentHeight()IntegerReturns the inherent height of this image in pixels.
getInherentWidth()IntegerReturns the inherent height of this image in pixels.
getScript()StringReturns the name of the function assigned to this image.
getSheet()SheetReturns the sheet this image appears on.
getUrl()StringGets the image's source URL; returns null if the URL is unavailable.
getWidth()IntegerReturns the actual width of this image in pixels.
remove()voidDeletes this image from the spreadsheet.
replace(blob)OverGridImageReplaces this image with the one specified by the provided BlobSource.
replace(url)OverGridImageReplaces this image with the one from the specified URL.
resetSize()OverGridImageResets this image to its inherent dimensions.
setAltTextDescription(description)OverGridImageSets the alt-text description for this image.
setAltTextTitle(title)OverGridImageSets the alt text title for this image.
setAnchorCell(cell)OverGridImageSets the cell where an image is anchored.
setAnchorCellXOffset(offset)OverGridImageSets the horizontal pixel offset from the anchor cell.
setAnchorCellYOffset(offset)OverGridImageSets the vertical pixel offset from the anchor cell.
setHeight(height)OverGridImageSets the actual height of this image in pixels.
setWidth(width)OverGridImageSets the actual width of this image in pixels.

PageProtection

PivotFilter

Methods

MethodReturn typeBrief description
getFilterCriteria()FilterCriteriaReturns the filter criteria for this pivot filter.
getPivotTable()PivotTableReturns the PivotTable that this filter belongs to.
getSourceDataColumn()IntegerReturns the number of the source data column this filter operates on.
getSourceDataSourceColumn()DataSourceColumnReturns the data source column the filter operates on.
remove()voidRemoves this pivot filter from the pivot table.
setFilterCriteria(filterCriteria)PivotFilterSets the filter criteria for this pivot filter.

PivotGroup

Methods

MethodReturn typeBrief description
addManualGroupingRule(groupName, groupMembers)PivotGroupAdds a manual grouping rule for this pivot group.
areLabelsRepeated()BooleanReturns whether labels are displayed as repeated.
clearGroupingRule()PivotGroupRemoves any grouping rules from this pivot group.
clearSort()PivotGroupRemoves any sorting applied to this group.
getDateTimeGroupingRule()DateTimeGroupingRuleReturns the date-time grouping rule on the pivot group, or null if no date-time grouping rule is set.
getDimension()DimensionReturns whether this is a row or column group.
getGroupLimit()PivotGroupLimitReturns the pivot group limit on the pivot group.
getIndex()IntegerReturns the index of this pivot group in the current group order.
getPivotTable()PivotTableReturns the PivotTable which this grouping belongs to.
getSourceDataColumn()IntegerReturns the number of the source data column this group summarizes.
getSourceDataSourceColumn()DataSourceColumnReturns the data source column the pivot group operates on.
hideRepeatedLabels()PivotGroupHides repeated labels for this grouping.
isSortAscending()BooleanReturns true if the sort is ascending, returns false if the sort order is descending.
moveToIndex(index)PivotGroupMoves this group to the specified position in the current list of row or column groups.
remove()voidRemoves this pivot group from the table.
removeManualGroupingRule(groupName)PivotGroupRemoves the manual grouping rule with the specified groupName.
resetDisplayName()PivotGroupResets the display name of this group in the pivot table to its default value.
setDateTimeGroupingRule(dateTimeGroupingRuleType)PivotGroupSets the date-time grouping rule on the pivot group.
setDisplayName(name)PivotGroupSets the display name of this group in the pivot table.
setGroupLimit(countLimit)PivotGroupSets the pivot group limit on the pivot group.
setHistogramGroupingRule(minValue, maxValue, intervalSize)PivotGroupSets a histogram grouping rule for this pivot group.
showRepeatedLabels()PivotGroupWhen there is more than one row or column grouping, this method displays this grouping's label for each entry of the subsequent grouping.
showTotals(showTotals)PivotGroupSets whether to show total values for this pivot group in the table.
sortAscending()PivotGroupSets the sort order to be ascending.
sortBy(value, oppositeGroupValues)PivotGroupSorts this group by the specified PivotValue for the values from the oppositeGroupValues.
sortDescending()PivotGroupSets the sort order to be descending.
totalsAreShown()BooleanReturns whether total values are currently shown for this pivot group.

PivotGroupLimit

Methods

MethodReturn typeBrief description
getCountLimit()IntegerGets the count limit on rows or columns in the pivot group.
getPivotGroup()PivotGroupReturns the pivot group the limit belongs to.
remove()voidRemoves the pivot group limit.
setCountLimit(countLimit)PivotGroupLimitSets the count limit on rows or columns in the pivot group.

PivotTable

Methods

MethodReturn typeBrief description
addCalculatedPivotValue(name, formula)PivotValueCreates a new pivot value in the pivot table calculated from the specified formula with the specified name.
addColumnGroup(sourceDataColumn)PivotGroupDefines a new pivot column grouping in the pivot table.
addFilter(sourceDataColumn, filterCriteria)PivotFilterCreates a new pivot filter for the pivot table.
addPivotValue(sourceDataColumn, summarizeFunction)PivotValueDefines a new pivot value in the pivot table with the specified summarizeFunction.
addRowGroup(sourceDataColumn)PivotGroupDefines a new pivot row grouping in the pivot table.
asDataSourcePivotTable()DataSourcePivotTableReturns the pivot table as a data source pivot table if the pivot table is linked to a DataSource, or null otherwise.
getAnchorCell()RangeReturns the Range representing the cell where this pivot table is anchored.
getColumnGroups()PivotGroup[]Returns an ordered list of the column groups in this pivot table.
getFilters()PivotFilter[]Returns an ordered list of the filters in this pivot table.
getPivotValues()PivotValue[]Returns an ordered list of the pivot values in this pivot table.
getRowGroups()PivotGroup[]Returns an ordered list of the row groups in this pivot table.
getSourceDataRange()RangeReturns the source data range on which the pivot table is constructed.
getValuesDisplayOrientation()DimensionReturns whether values are displayed as rows or columns.
remove()voidDeletes this pivot table.
setValuesDisplayOrientation(dimension)PivotTableSets the layout of this pivot table to display values as columns or rows.

PivotTableSummarizeFunction

Properties

PropertyTypeDescription
CUSTOMEnumA custom function, this value is only valid for calculated fields.
SUMEnumThe SUM function
COUNTAEnumThe COUNTA function
COUNTEnumThe COUNT function
COUNTUNIQUEEnumThe COUNTUNIQUE function
AVERAGEEnumThe AVERAGE function
MAXEnumThe MAX function
MINEnumThe MIN function
MEDIANEnumThe MEDIAN function
PRODUCTEnumThe PRODUCT function
STDEVEnumThe STDEV function
STDEVPEnumThe STDEVP function
VAREnumThe VAR function
VARPEnumThe VARP function

PivotValue

Methods

MethodReturn typeBrief description
getDisplayType()PivotValueDisplayTypeReturns the display type describing how this pivot value is currently displayed in the table.
getFormula()StringReturns the formula used to calculate this value.
getPivotTable()PivotTableReturns the PivotTable which this value belongs to.
getSourceDataColumn()IntegerReturns the number of the source data column the pivot value summarizes.
getSourceDataSourceColumn()DataSourceColumnReturns the data source column the pivot value summarizes.
getSummarizedBy()PivotTableSummarizeFunctionReturns this group’s summarization function.
remove()voidRemove this value from the pivot table.
setDisplayName(name)PivotValueSets the display name for this value in the pivot table.
setFormula(formula)PivotValueSets the formula used to calculate this value.
showAs(displayType)PivotValueDisplays this value in the pivot table as a function of another value.
summarizeBy(summarizeFunction)PivotValueSets the summarization function.

PivotValueDisplayType

Properties

PropertyTypeDescription
DEFAULTEnumDefault.
PERCENT_OF_ROW_TOTALEnumDisplays pivot values as a percent of the total for that row.
PERCENT_OF_COLUMN_TOTALEnumDisplays pivot values as a percent of the total for that column.
PERCENT_OF_GRAND_TOTALEnumDisplays pivot values as a percent of the grand total.

Protection

Methods

MethodReturn typeBrief description
addEditor(emailAddress)ProtectionAdds the given user to the list of editors for the protected sheet or range.
addEditor(user)ProtectionAdds the given user to the list of editors for the protected sheet or range.
addEditors(emailAddresses)ProtectionAdds the given array of users to the list of editors for the protected sheet or range.
addTargetAudience(audienceId)ProtectionAdds the specified target audience as an editor of the protected range.
canDomainEdit()BooleanDetermines whether all users in the domain that owns the spreadsheet have permission to edit the protected range or sheet.
canEdit()BooleanDetermines whether the user has permission to edit the protected range or sheet.
getDescription()StringGets the description of the protected range or sheet.
getEditors()User[]Gets the list of editors for the protected range or sheet.
getProtectionType()ProtectionTypeGets the type of the protected area, either RANGE or SHEET.
getRange()RangeGets the range that is being protected.
getRangeName()StringGets the name of the protected range if it is associated with a named range.
getTargetAudiences()TargetAudience[]Returns the IDs of the target audiences that can edit the protected range.
getUnprotectedRanges()Range[]Gets an array of unprotected ranges within a protected sheet.
isWarningOnly()BooleanDetermines if the protected area is using "warning based" protection.
remove()voidUnprotects the range or sheet.
removeEditor(emailAddress)ProtectionRemoves the given user from the list of editors for the protected sheet or range.
removeEditor(user)ProtectionRemoves the given user from the list of editors for the protected sheet or range.
removeEditors(emailAddresses)ProtectionRemoves the given array of users from the list of editors for the protected sheet or range.
removeTargetAudience(audienceId)ProtectionRemoves the specified target audience as an editor of the protected range.
setDescription(description)ProtectionSets the description of the protected range or sheet.
setDomainEdit(editable)ProtectionSets whether all users in the domain that owns the spreadsheet have permission to edit the protected range or sheet.
setNamedRange(namedRange)ProtectionAssociates the protected range with an existing named range.
setRange(range)ProtectionAdjusts the range that is being protected.
setRangeName(rangeName)ProtectionAssociates the protected range with an existing named range.
setUnprotectedRanges(ranges)ProtectionUnprotects the given array of ranges within a protected sheet.
setWarningOnly(warningOnly)ProtectionSets whether or not this protected range is using "warning based" protection.

ProtectionType

Properties

PropertyTypeDescription
RANGEEnumProtection for a range.
SHEETEnumProtection for a sheet.

Range

Methods

MethodReturn typeBrief description
activate()RangeSets the specified range as the active range, with the top left cell in the range as the current cell.
activateAsCurrentCell()RangeSets the specified cell as the current cell.
addDeveloperMetadata(key)RangeAdds developer metadata with the specified key to the range.
addDeveloperMetadata(key, visibility)RangeAdds developer metadata with the specified key and visibility to the range.
addDeveloperMetadata(key, value)RangeAdds developer metadata with the specified key and value to the range.
addDeveloperMetadata(key, value, visibility)RangeAdds developer metadata with the specified key, value, and visibility to the range.
applyColumnBanding()BandingApplies a default column banding theme to the range.