本帖最后由 LIUZHIPENG 于 2024-5-7 11:42 编辑
SpreadJS不能插入新的单元格,因为它会把非空的单元格从工作表的末端推出去.
也设置了rowCount ,还是出现此问题
- spread.bind(GC.Spread.Sheets.Designer.Events.FileLoaded, (event, data) => {
- //遍历spreadObj 所有sheet
- let sheetCount = spreadObj.getSheetCount()
- //缩放设置 100%
- for (let i = 0; i < sheetCount; i++) {
- let sheet = spreadObj.getSheet(i)
- //获取原rowCount,进行+60
- let rowCount = sheet.getRowCount()
- sheet.setRowCount(rowCount + 60)
- sheet.zoom(1, 1)
- }
- //触发设置下拉选项
- // this.setAllSheetSelect()
- })
复制代码
|