var table = activeSheet.tables.add("tableRecords",6, 0, 7, 7, GC.Spread.Sheets.Tables.TableThemes.light2);
table.autoGenerateColumns(false);
var tableColumn1 = new GC.Spread.Sheets.Tables.TableColumn();
tableColumn1.name("列1");
tableColumn1.dataField("列1");
var tableColumn2 = new GC.Spread.Sheets.Tables.TableColumn();
tableColumn2.name("列2");
tableColumn2.dataField("列2");
//这里需要夸2列 ---不然数据显示不到对应的单元格
var tableColumn3 = new GC.Spread.Sheets.Tables.TableColumn();
tableColumn3.name("列3");
tableColumn3.dataField("列3");
//这里需要夸2列 ---不然数据显示不到对应的单元格
var tableColumn4 = new GC.Spread.Sheets.Tables.TableColumn();
tableColumn4.name("列4");
tableColumn4.dataField("列4");
table.bindColumns([tableColumn1, tableColumn2, tableColumn3, tableColumn4);
table.bindingPath("records"); |