Class Banding
    
    
      
    
    
      
      透過集合功能整理內容
    
    
      
      你可以依據偏好儲存及分類內容。
    
  
    
  
      
    
  
  
  
  
  
  
    
    
    
Banding
存取及修改區塊,也就是套用至範圍內資料列或資料欄的顏色模式。每個區塊都包含一個範圍,以及一組用於資料列、資料欄、標題和頁尾的顏色。
 
內容詳盡的說明文件
copyTo(range)
將這個頻帶複製到其他範圍。
參數
| 名稱 | 類型 | 說明 | 
| range | Range | 要複製這個頻帶的範圍。 | 
回攻員
Banding - 新的頻帶。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getFirstColumnColorObject()
傳回條紋中第一個交替欄的顏色,如果未設定顏色,則傳回 null。
回攻員
Color:條紋中第一個交替的欄顏色,如果未設定顏色則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getFirstRowColorObject()
傳回第一個交替列顏色,如果未設定顏色,則傳回 null。
回攻員
Color:條紋中第一個交替列的顏色,如果未設定顏色,則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getHeaderColumnColorObject()
傳回頻帶中第一個欄的顏色,如果未設定顏色,則傳回 null。
回攻員
Color:頻帶中的第一欄顏色,如果未設定顏色則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getRange()
傳回此頻帶的範圍。
回攻員
Range:此頻帶的範圍。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getSecondColumnColorObject()
傳回頻帶中的第二個交替欄顏色,如果未設定顏色,則傳回 null。
回攻員
Color:色帶中的第二個交錯欄顏色,如果未設定顏色,則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getSecondRowColorObject()
傳回第二個交替列顏色,如果未設定顏色,則傳回 null。
回攻員
Color:條紋中的第二個交錯列顏色,如果未設定顏色,則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
remove()
移除這條紋。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setFirstColumnColor(color)
設定第一個交替的欄顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | String | CSS 符號中的顏色代碼 (例如 '#ffffff'或'white'),或是null來清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setFirstColumnColorObject(color)
設定頻帶中第一個交替的欄顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | Color | 在頻帶中新增第一個交替欄顏色;將其設為 null會清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setFirstRowColor(color)
設定交替的第一列顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | String | CSS 符號中的顏色代碼 (例如 '#ffffff'或'white'),或是null來清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setFirstRowColorObject(color)
設定條紋中第一個交替列的顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | Color | 新的第一個交替顏色會出現在色帶中,將其設為 null會清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setHeaderColumnColor(color)
設定標題欄的顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | String | CSS 符號中的顏色代碼 (例如 '#ffffff'或'white'),或是null來清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setHeaderColumnColorObject(color)
設定標題欄的顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | Color | 新的標題欄顏色;設定為 null會清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setRange(range)
設定此頻帶的範圍。
參數
| 名稱 | 類型 | 說明 | 
| range | Range | 這個頻帶的新範圍。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setSecondColumnColor(color)
設定交錯的第二欄顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | String | CSS 符號中的顏色代碼 (例如 '#ffffff'或'white'),或是null來清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setSecondColumnColorObject(color)
設定頻帶中的第二個交替欄顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | Color | 在頻帶中新增第二個交錯欄顏色;將其設為 null會清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setSecondRowColor(color)
設定交錯的第二列顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | String | CSS 符號中的顏色代碼 (例如 '#ffffff'或'white'),或是null來清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
setSecondRowColorObject(color)
設定頻帶中的第二個交替顏色。
參數
| 名稱 | 類型 | 說明 | 
| color | Color | 新的交錯條紋第二種顏色;將其設為 null會清除顏色。 | 
回攻員
Banding:這個區塊用於鏈結。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
已淘汰的方法
getFirstColumnColor()
已淘汰。已替換為 getFirstColumnColorObject()
傳回交替的第一個欄顏色,如果未設定顏色,則傳回 null。
回攻員
String:CSS 符號中的顏色代碼 (例如 '#ffffff' 或 'white'),如果未設定顏色則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getFirstRowColor()
已淘汰。已替換為 getFirstRowColorObject()
傳回第一列交替顏色,或如果未設定顏色則傳回 null。
回攻員
String:CSS 符號中的顏色代碼 (例如 '#ffffff' 或 'white'),如果未設定顏色則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getHeaderColumnColor()
已淘汰。已替換為 getHeaderColumnColorObject()
傳回標題欄的顏色,如果未設定顏色,則傳回 null。
回攻員
String:CSS 符號中的顏色代碼 (例如 '#ffffff' 或 'white'),如果未設定顏色則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
已淘汰。已替換為 getHeaderRowColorObject()
傳回標題列的顏色,如果未設定顏色,則傳回 null。
回攻員
String:CSS 符號中的顏色代碼 (例如 '#ffffff' 或 'white'),如果未設定顏色則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getSecondColumnColor()
已淘汰。已替換為 getSecondColumnColorObject()
傳回交替的第二欄顏色,如果未設定顏色,則傳回 null。
回攻員
String:十六進位顏色,如果未設定顏色則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
getSecondRowColor()
已淘汰。已替換為 getSecondRowColorObject()
傳回交錯的第二列顏色,如果未設定顏色,則傳回 null。
回攻員
String:CSS 符號中的顏色代碼 (例如 '#ffffff' 或 'white'),如果未設定顏色則為 null。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/spreadsheets.currentonly
- 
https://www.googleapis.com/auth/spreadsheets
 
 
 
  
  
  
    
  
 
  
    
    
      
    
    
  
       
         
  
       
    
    
  
  
  除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
  上次更新時間:2025-07-26 (世界標準時間)。
  
  
    
    
    
      
  
    
  
  
    
      [[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[],[]]