Class Banding

Banding

Access 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

MethodReturn typeBrief description
copyTo(range)BandingCopies this banding to another range.
getFirstColumnColor()StringReturns the first column color that is alternating, or null if no color is set.
getFirstRowColor()StringReturns the first row color that is alternating or null if no color is set.
getFooterColumnColor()StringReturns the color of the last column, or null if no color is set.
getFooterRowColor()StringReturns the color of the last row, or null if no color is set.
getHeaderColumnColor()StringReturns the color of the header column, or null if no color is set.
getHeaderRowColor()StringReturns the color of the header row or null if no color is set.
getRange()RangeReturns the range for this banding.
getSecondColumnColor()StringReturns the second column color that is alternating, or null if no color is set.
getSecondRowColor()StringReturns the second row color that is alternating or null if no color is set.
remove()voidRemoves this banding.
setFirstColumnColor(color)BandingSets the first column color that is alternating.
setFirstRowColor(color)BandingSets the first row color that is alternating.
setFooterColumnColor(color)BandingSets the color of the last column.
setFooterRowColor(color)BandingSets the color of the last row.
setHeaderColumnColor(color)BandingSets the color of the header column.
setHeaderRowColor(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.
setSecondRowColor(color)BandingSets the second row color that is alternating.

Detailed documentation

copyTo(range)

Copies this banding to another range.

Parameters

NameTypeDescription
rangeRangeThe range to copy this banding to.

Return

Banding — the new banding


getFirstColumnColor()

Returns the first column color that is alternating, or null if no color is set.

Return

String — the color code in CSS notation (such as '#ffffff' or 'white'), or null if no color is set


getFirstRowColor()

Returns the first row color that is alternating or null if no color is set.

Return

String — the color code in CSS notation (such as '#ffffff' or 'white'), or null if no color is set


getFooterColumnColor()

Returns the color of the last column, or null if no color is set.

Return

String — the color code in CSS notation (such as '#ffffff' or 'white'), or null if no color is set


getFooterRowColor()

Returns the color of the last row, or null if no color is set.

Return

String — the color code in CSS notation (such as '#ffffff' or 'white'), or null if no color is set


getHeaderColumnColor()

Returns the color of the header column, or null if no color is set.

Return

String — the color code in CSS notation (such as '#ffffff' or 'white'), or null if no color is set


getHeaderRowColor()

Returns the color of the header row or null if no color is set.

Return

String — the color code in CSS notation (such as '#ffffff' or 'white'), or null if no color is set


getRange()

Returns the range for this banding.

Return

Range — the range for this banding


getSecondColumnColor()

Returns the second column color that is alternating, or null if no color is set.

Return

String — the HEX color or null if no color is set


getSecondRowColor()

Returns the second row color that is alternating or null if no color is set.

Return

String — the color code in CSS notation (such as '#ffffff' or 'white'), or null if no color is set


remove()

Removes this banding.


setFirstColumnColor(color)

Sets the first column color that is alternating.

Parameters

NameTypeDescription
colorStringThe color code in CSS notation (such as '#ffffff' or 'white'), or null to clear the color..

Return

Banding — this banding, for chaining


setFirstRowColor(color)

Sets the first row color that is alternating.

Parameters

NameTypeDescription
colorStringThe color code in CSS notation (such as '#ffffff' or 'white'), or null to clear the color.

Return

Banding — this banding, for chaining


setFooterColumnColor(color)

Sets the color of the last column.

Parameters

NameTypeDescription
colorStringThe color code in CSS notation (such as '#ffffff' or 'white'), or null to clear the color.

Return

Banding — this banding, for chaining


setFooterRowColor(color)

Sets the color of the last row.

Parameters

NameTypeDescription
colorStringThe color code in CSS notation (such as '#ffffff' or 'white'), or null to clear the color.

Return

Banding — this banding, for chaining


setHeaderColumnColor(color)

Sets the color of the header column.

Parameters

NameTypeDescription
colorStringThe color code in CSS notation (such as '#ffffff' or 'white'), or null to clear the color.

Return

Banding — this banding, for chaining


setHeaderRowColor(color)

Sets the color of the header row.

Parameters

NameTypeDescription
colorStringThe color code in CSS notation (such as '#ffffff' or 'white'), or null to clear the color.

Return

Banding — this banding, for chaining


setRange(range)

Sets the range for this banding.

Parameters

NameTypeDescription
rangeRangeThe new range for this banding.

Return

Banding — this banding, for chaining


setSecondColumnColor(color)

Sets the second column color that is alternating.

Parameters

NameTypeDescription
colorStringThe color code in CSS notation (such as '#ffffff' or 'white'), or null to clear the color.

Return

Banding — this banding, for chaining


setSecondRowColor(color)

Sets the second row color that is alternating.

Parameters

NameTypeDescription
colorStringThe color code in CSS notation (such as '#ffffff' or 'white'), or null to clear the color.

Return

Banding — this banding, for chaining

Send feedback about...

Apps Script
Apps Script
Need help? Visit our support page.