Class Banding
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
バンディング範囲の行または列に適用されるカラー パターンであるバンディングにアクセスして変更します。各バンディングは、行、列、ヘッダー、フッターの範囲と色のセットで構成されます。
詳細なドキュメント
copyTo(range)
このバンディングを別の範囲にコピーします。
パラメータ
| 名前 | 型 | 説明 |
range | Range | このバンディングをコピーする範囲。 |
戻る
Banding - 新しいバンディング。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getFirstColumnColorObject()
バンディングの最初の交互の列の色を返します。色が設定されていない場合は null を返します。
戻る
Color|null - バンディングの最初の交互の列の色。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getFirstRowColorObject()
交互の行の最初の色を返します。色が設定されていない場合は null を返します。
戻る
Color|null - バンディングの最初の交互の行の色。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getHeaderColumnColorObject()
バンディングの最初の列の色を返します。色が設定されていない場合は null を返します。
戻る
Color|null - バンディングの 1 列目の色。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getRange()
このバンディングの範囲を返します。
戻る
Range - このバンディングの範囲。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSecondColumnColorObject()
バンディングの 2 番目の交互の列の色を返します。色が設定されていない場合は null を返します。
戻る
Color|null - バンディングの 2 番目の交互の列の色。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSecondRowColorObject()
2 番目の交互の行の色を返します。色が設定されていない場合は null を返します。
戻る
Color|null - バンディングの 2 番目の交互の行の色。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
remove()
このバンディングを削除します。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setFirstColumnColor(color)
交互に表示される最初の列の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | String | CSS 表記の色コード('#ffffff' や 'white' など)、または色をクリアする null。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setFirstColumnColorObject(color)
バンディングの最初の交互の列の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | Color | バンディングの新しい最初の交互列の色。null に設定すると、色がクリアされます。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setFirstRowColor(color)
交互に表示される最初の行の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | String | CSS 表記の色コード('#ffffff' や 'white' など)、または色をクリアする null。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setFirstRowColorObject(color)
バンディングの最初の交互の行の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | Color | バンディングの新しい最初の交互の色。null に設定すると、色がクリアされます。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setHeaderColumnColor(color)
ヘッダー列の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | String | CSS 表記の色コード('#ffffff' や 'white' など)、または色をクリアする null。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setHeaderColumnColorObject(color)
ヘッダー列の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | Color | 新しいヘッダー列の色。null に設定すると、色がクリアされます。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setRange(range)
このバンディングの範囲を設定します。
パラメータ
| 名前 | 型 | 説明 |
range | Range | このバンディングの新しい範囲。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setSecondColumnColor(color)
交互に表示される 2 列目の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | String | CSS 表記の色コード('#ffffff' や 'white' など)、または色をクリアする null。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setSecondColumnColorObject(color)
バンディングの 2 番目の交互の列の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | Color | バンディングの 2 番目の交互の列の新しい色。null に設定すると、色がクリアされます。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setSecondRowColor(color)
交互に表示される 2 行目の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | String | CSS 表記の色コード('#ffffff' や 'white' など)、または色をクリアする null。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setSecondRowColorObject(color)
バンディングの 2 番目の交互の色を設定します。
パラメータ
| 名前 | 型 | 説明 |
color | Color | バンディングの新しい 2 番目の交互の色。null に設定すると、色がクリアされます。 |
戻る
Banding - このバンディング(チェーン用)。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
サポート終了のメソッド
getFirstColumnColor()
非推奨。getFirstColumnColorObject() に置き換え
交互の最初の列の色を返します。色が設定されていない場合は null を返します。
戻る
String|null - CSS 表記のカラーコード('#ffffff' や 'white' など)。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getFirstRowColor()
非推奨。getFirstRowColorObject() に置き換え
交互の最初の行の色を返します。色が設定されていない場合は null を返します。
戻る
String|null - CSS 表記のカラーコード('#ffffff' や 'white' など)。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getHeaderColumnColor()
非推奨。getHeaderColumnColorObject() に置き換え
ヘッダー列の色を返します。色が設定されていない場合は null を返します。
戻る
String|null - CSS 表記のカラーコード('#ffffff' や 'white' など)。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
非推奨。getHeaderRowColorObject() に置き換え
ヘッダー行の色を返します。色が設定されていない場合は null を返します。
戻る
String|null - CSS 表記のカラーコード('#ffffff' や 'white' など)。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSecondColumnColor()
非推奨。getSecondColumnColorObject() に置き換え
交互の 2 列目の色を返します。色が設定されていない場合は null を返します。
戻る
String|null - HEX カラー。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSecondRowColor()
非推奨。getSecondRowColorObject() に置き換え
交互になっている 2 つのストライプ色の 2 つ目を返します。色が設定されていない場合は null を返します。
戻る
String|null - CSS 表記のカラーコード('#ffffff' や 'white' など)。色が設定されていない場合は null。
承認
このメソッドを使用するスクリプトには、次の 1 つ以上のスコープによる承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-12-11 UTC。
[null,null,["最終更新日 2025-12-11 UTC。"],[],[]]