部分代码如下:
var rowSize = data.recordList.length; //总行数
var colSize = columns.length; //总列数(是预先设定的模板,如该表需要显示的几个字段按照列展示)
var table = sheet.tables.add('tables'+beginLine, beginLine, 0, rowSize, colSize);
var tableColumns =new Array(columns.length);
//table.insertRows(40, 5, true /*isInsertAfter*/);
for(var i=0;i<colSize;i++){
var tableColumn = new GC.Spread.Sheets.Tables.TableColumn(i+1, columns[i].attrName, columns[i].attrName);
tableColumns[i] = tableColumn;
}
table.autoGenerateColumns(false);
table.bind(tableColumns, 'recordList', data);
sheet.tables.remove(table, GC.Spread.Sheets.Tables.TableRemoveOptions.keepData | GC.Spread.Sheets.Tables.TableRemo)
sheet.deleteRows(beginLine, 1);
报错:
annot insert new cells because it would push non-empty cells of the end of worksheet. These cells might appear empty but have blank values, some formatting, or a formula. Delete enough rows or columns to make room for what you want to insert and then try again.
请问这是啥原因呢
|
|