Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

你可以使用 options.allowCellOverflow 属性来设置当单元格中的文字的长度较长时,是否溢出到相邻的单元格中。
方式,并且也设置了允许单元格溢出。
示例代码
以下代码设置了单元格的对齐方式,并且也设置了允许单元格溢出。

JavaScript

Copy Code

activeSheet.options.allowCellOverflow = true;activeSheet.getCell(0,3, GC.Spread.Sheets.SheetArea.viewport).hAlign(GC.Spread.Sheets.HorizontalAlign.left);activeSheet.getCell(1,3, GC.Spread.Sheets.SheetArea.viewport).hAlign(GC.Spread.Sheets.HorizontalAlign.center);activeSheet.getCell(2,3, GC.Spread.Sheets.SheetArea.viewport).hAlign(GC.Spread.Sheets.HorizontalAlign.right);activeSheet.getCell(3,3, GC.Spread.Sheets.SheetArea.viewport).hAlign(GC.Spread.Sheets.HorizontalAlign.general);activeSheet.getCell(0,3, GC.Spread.Sheets.SheetArea.viewport).text("Data overflows to the right");activeSheet.getCell(1,3, GC.Spread.Sheets.SheetArea.viewport).text("Data overflows to the left and right");activeSheet.getCell(2,3, GC.Spread.Sheets.SheetArea.viewport).text("Data overflows to the left");

 

更多信息
Worksheet Method


  • No labels