GetWrapText
返回有关单元格自动换行样式的信息。
语法
expression.GetWrapText();
expression - 表示 ApiRange 类的变量。
参数
此方法没有任何参数。
返回值
boolean
示例
检查电子表格中的单元格是否启用了文本换行。
// How do I find out if a cell is set to wrap its text in a spreadsheet?
// Confirm the wrap setting of a cell by reading and displaying it in a spreadsheet.
let worksheet = Api.GetActiveSheet();
let range = worksheet.GetRange("A1");
range.SetValue("This is the text wrapped to fit the cell size.");
range.SetWrap(true);
worksheet.GetRange("A3").SetValue("The text in the cell A1 is wrapped: " + range.GetWrapText());