本帖最后由 红叶舞秋山 于 2022-1-26 18:16 编辑
使用设计器做了一个表格 和 数据源
保存了数据格式 (bindingdata变量)。
然后在SpreadSheets 中 想给数据让它显示出来:
- <SpreadSheets workbookInitialized={workbookInitialized}>
- </SpreadSheets>
复制代码- const workbookInitialized = (spread)=>{
- var activeSheet = spread.getActiveSheet();
- var people = [
- {name: "yaojia", age: 50},
- {name: "lilian", age: 50},
- ];
- spread.formJSON(bindingdata)
- const source = new GC.Spread.Sheets.Bindings.CellBindingSource(people)
- activeSheet.setDataSource(source)}
复制代码
结果没显示出来 。显示个空白文档。请教一下哪里出问题了?
|