Enum WrapStrategy
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
WrapStrategy
用於處理儲存格文字斷行的策略列舉。
如要呼叫列舉,請呼叫其父項類別、名稱和屬性。例如
SpreadsheetApp.WrapStrategy.WRAP
。
屬性
屬性 | 類型 | 說明 |
WRAP | Enum | 將超過儲存格寬度的行換到新行。長度超過一行的單字會在半型字元層級換行。 |
OVERFLOW | Enum | 溢出文字會流入下一個儲存格 (只要該儲存格為空白)。如果下一個儲存格非空白,則此行為與 CLIP 相同。 |
CLIP | Enum | 截斷超過單元格寬度的行。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003eWrapStrategy\u003c/code\u003e is used to control how text wraps within a cell in Google Sheets.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eWRAP\u003c/code\u003e wraps text to new lines within the cell, \u003ccode\u003eOVERFLOW\u003c/code\u003e extends text to the next cell if empty, and \u003ccode\u003eCLIP\u003c/code\u003e cuts off overflowing text.\u003c/p\u003e\n"],["\u003cp\u003eAccess these options using \u003ccode\u003eSpreadsheetApp.WrapStrategy\u003c/code\u003e followed by the desired property like \u003ccode\u003eWRAP\u003c/code\u003e, \u003ccode\u003eOVERFLOW\u003c/code\u003e, or \u003ccode\u003eCLIP\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Enum WrapStrategy\n\nWrapStrategy\n\nAn enumeration of the strategies used to handle cell text wrapping.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nSpreadsheetApp.WrapStrategy.WRAP`. \n\n### Properties\n\n| Property | Type | Description |\n|------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| `WRAP` | `Enum` | Wrap lines that are longer than the cell width onto a new line. Single words that are longer than a line are wrapped at the character level. |\n| `OVERFLOW` | `Enum` | Overflow lines into the next cell, so long as that cell is empty. If the next cell over is non-empty, this behaves the same as `CLIP`. |\n| `CLIP` | `Enum` | Clip lines that are longer than the cell width. |"]]