Stay organized with collections Save and categorize content based on your preferences.
BandingAccess and modify bandings, the color patterns applied to rows or columns of a range. Each banding consists of a range and a set of colors for rows, columns, headers, and footers.
Methods Deprecated methods Method Return type Brief descriptiongetFirstColumnColor()
String
Returns the first column color that is alternating, or null
if no color is set. getFirstRowColor()
String
Returns the first row color that is alternating or null
if no color is set. getFooterColumnColor()
String
Returns the color of the last column, or null
if no color is set. getFooterRowColor()
String
Returns the color of the last row, or null
if no color is set. getHeaderColumnColor()
String
Returns the color of the header column, or null
if no color is set. getHeaderRowColor()
String
Returns the color of the header row or null
if no color is set. getSecondColumnColor()
String
Returns the second column color that is alternating, or null
if no color is set. getSecondRowColor()
String
Returns the second row color that is alternating or null
if no color is set. Detailed documentation copyTo(range)
Copies this banding to another range.
Parameters Name Type Descriptionrange
Range
The range to copy this banding to. Return
Banding
— The new banding.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getFirstColumnColorObject()
Returns the first alternating column color in the banding, or null
if no color is set.
Color
— The first alternating column color in the banding, or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getFirstRowColorObject()
Returns the first alternating row color, or null
if no color is set.
Color
— The first alternating row color in the banding, or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getHeaderColumnColorObject()
Returns the color of the first column in the banding, or null
if no color is set.
Color
— The first column color in the banding, or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getRange()
Returns the range for this banding.
ReturnRange
— The range for this banding.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getSecondColumnColorObject()
Returns the second alternating column color in the banding, or null
if no color is set.
Color
— The second alternating column color in the banding, or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getSecondRowColorObject()
Returns the second alternating row color, or null
if no color is set.
Color
— The second alternating row color in the banding, or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
remove()
Removes this banding.
AuthorizationScripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setFirstColumnColor(color)
Sets the first column color that is alternating.
Parameters Name Type Descriptioncolor
String
The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
to clear the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setFirstColumnColorObject(color)
Sets the first alternating column color in the banding.
Parameters Name Type Descriptioncolor
Color
The new first alternating column color in the banding; setting to null
clears the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setFirstRowColor(color)
Sets the first row color that is alternating.
Parameters Name Type Descriptioncolor
String
The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
to clear the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setFirstRowColorObject(color)
Sets the first alternating row color in the banding.
Parameters Name Type Descriptioncolor
Color
The new first alternating color in the banding; setting to null
clears the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setHeaderColumnColor(color)
Sets the color of the header column.
Parameters Name Type Descriptioncolor
String
The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
to clear the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setHeaderColumnColorObject(color)
Sets the color of the header column.
Parameters Name Type Descriptioncolor
Color
The new header column color; setting to null
clears the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setRange(range)
Sets the range for this banding.
Parameters Name Type Descriptionrange
Range
The new range for this banding. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setSecondColumnColor(color)
Sets the second column color that is alternating.
Parameters Name Type Descriptioncolor
String
The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
to clear the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setSecondColumnColorObject(color)
Sets the second alternating column color in the banding.
Parameters Name Type Descriptioncolor
Color
The new second alternating column color in the banding; setting to null
clears the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setSecondRowColor(color)
Sets the second row color that is alternating.
Parameters Name Type Descriptioncolor
String
The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
to clear the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setSecondRowColorObject(color)
Sets the second alternating color in the banding.
Parameters Name Type Descriptioncolor
Color
The new second alternating color in the banding; setting to null
clears the color. Return
Banding
— This banding, for chaining.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getFirstColumnColor()
Deprecated. Replaced by getFirstColumnColorObject()
Returns the first column color that is alternating, or null
if no color is set.
String
— The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getFirstRowColor()
Deprecated. Replaced by getFirstRowColorObject()
Returns the first row color that is alternating or null
if no color is set.
String
— The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getHeaderColumnColor()
Deprecated. Replaced by getHeaderColumnColorObject()
Returns the color of the header column, or null
if no color is set.
String
— The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
Deprecated. Replaced by getHeaderRowColorObject()
Returns the color of the header row or null
if no color is set.
String
— The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getSecondColumnColor()
Deprecated. Replaced by getSecondColumnColorObject()
Returns the second column color that is alternating, or null
if no color is set.
String
— The HEX color or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
getSecondRowColor()
Deprecated. Replaced by getSecondRowColorObject()
Returns the second row color that is alternating or null
if no color is set.
String
— The color code in CSS notation (such as '#ffffff'
or 'white'
), or null
if no color is set.
Scripts that use this method require authorization with one or more of the following scopes:
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-03 UTC."],[[["The `Banding` class in Google Apps Script controls color banding for rows or columns within a Google Sheet range."],["It provides methods for setting colors of alternating rows/columns, headers, and footers using color codes or `Color` objects."],["You can manage the range associated with the banding, including copying it to a new range or removing it entirely."],["Several methods returning color values as strings are deprecated; use the corresponding `Color` object methods instead."],["All methods require authorization with specific scopes to access and modify the spreadsheet's banding."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4