本帖最后由 Richard.Huang 于 2024-5-16 14:30 编辑
产品:SpreadJS
版本:V14.2.3
- var checkBoxList = new GC.Spread.Sheets.CellTypes.CheckBoxList();
- checkBoxList.items([
- { text: "sample1", value: "1" },
- { text: "sample2", value: "2" },
- { text: "sample3", value: "3" },
- ]);
- checkBoxList.direction(GC.Spread.Sheets.CellTypes.Direction.vertical);
- checkBoxList.textAlign(GC.Spread.Sheets.CellTypes.TextAlign.left);
- checkBoxList.isFlowLayout(false);
- checkBoxList.maxColumnCount(2);
- checkBoxList.itemSpacing({
- horzontial: 80,
- vertical: 20,
- });
- checkBoxList.boxSize(20);
- let sheet = spread.getActiveSheet();
- sheet.setCellType(3, 2, checkBoxList, GC.Spread.Sheets.SheetArea.viewport);
复制代码
再导出excel,单元格上的复选框没了 |