compile (moduletype, str) {
this.TPLJson = JSON.parse(str)
this.mySpreadTpl.fromJSON(this.TPLJson)
this.worksheet = this.mySpreadTpl.getActiveSheet()
var dataSource = {}
if (moduletype === '2') {
const tables = this.TPLJson.sheets.Sheet1.tables
tables.forEach(item => {
dataSource[item.bindingPath] = []
})
}
var datasource = new GC.Spread.Sheets.Bindings.CellBindingSource(dataSource)
this.worksheet.setDataSource(datasource)
},
|
|