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

你可以在行和列上设置多重表头。多重表头里面可以显示文字,数字或者保持为空。

你可以在多重表头上显示自定义文字。

点击行表头或者列表头默认会选中对应的行或者列。

你可以将鼠标移动到表头的边缘,鼠标将会变成调整大小的形状,拖动即可调整行或者列的大小。

你可以使用 options.colHeaderAutoTextIndex,options.colHeaderAutoText,options.rowHeaderAutoTextIndex,和 options.rowHeaderAutoText 属性来改变默认的表头文字。

示例代码

以下代码设置了表头文字的类型,同时也创建了一个自定义表头文字。

JavaScript
activeSheet.setRowCount(2,GC.Spread.Sheets.SheetArea.colHeader);
activeSheet.setColumnCount(2,GC.Spread.Sheets.SheetArea.rowHeader);
activeSheet.setValue(0, 2,"Column",GC.Spread.Sheets.SheetArea.colHeader);
activeSheet.options.rowHeaderAutoTextIndex = 1;
activeSheet.options.rowHeaderAutoText = GC.Spread.Sheets.HeaderAutoText.numbers;
activeSheet.options.colHeaderAutoTextIndex = 1;
activeSheet.options.colHeaderAutoText = GC.Spread.Sheets.HeaderAutoText.letters;

更多信息

设置颜色
设置样式和主题
Worksheet Method

  • No labels