Enum WrapStrategy
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Chiến lược gói
Liệt kê các chiến lược dùng để xử lý việc xuống dòng văn bản trong ô.
Để gọi một enum, bạn gọi lớp mẹ, tên và thuộc tính của enum đó. Ví dụ:
SpreadsheetApp.WrapStrategy.WRAP
.
Thuộc tính
Thuộc tính | Loại | Mô tả |
WRAP | Enum | Gói các dòng dài hơn chiều rộng ô vào một dòng mới. Các từ đơn dài hơn một dòng sẽ được xuống dòng ở cấp ký tự. |
OVERFLOW | Enum | Các dòng tràn vào ô tiếp theo, miễn là ô đó trống. Nếu ô tiếp theo không trống, thì ô này sẽ hoạt động giống như CLIP . |
CLIP | Enum | Cắt các dòng dài hơn chiều rộng ô. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]