本帖最后由 Ellia.Duan 于 2022-9-21 14:34 编辑
这里可以用fillAuto来实现自动填充某个区域
- let datasource = new GC.Spread.Sheets.Bindings.CellBindingSource(data);
- let table1 = sheet.tables.findByName('gcTable0');
- table1.expandBoundRows(true);
- sheet.setDataSource(datasource);
- const tableRange = table1.range();
- console.log(tableRange.row,tableRange.col,tableRange.rowCount,tableRange.colCount,) //12,2,7,31
- var start = new GC.Spread.Sheets.Range(15,0,1,33);
- var r3 = new GC.Spread.Sheets.Range(15,0,4,33);
- sheet.fillAuto(start, r3, {
- fillType: GC.Spread.Sheets.Fill.FillType.auto,
- series: GC.Spread.Sheets.Fill.FillSeries.column,
- direction: GC.Spread.Sheets.Fill.FillDirection.down
- });
复制代码
|