var instance = new GC.Spread.Sheets.Worksheet(name); var value; // Type: any value = instance.setDataSource(data, reset);
Parameters
- data
- The data source.
- reset
true
if the sheet is reset; otherwise,false
.
true
if the sheet is reset; otherwise, false
.
var instance = new GC.Spread.Sheets.Worksheet(name); var value; // Type: any value = instance.setDataSource(data, reset);
true
if the sheet is reset; otherwise, false
.var activeSheet = spread.getActiveSheet(); var people = [ {name: "Albert", isAdult: false, country: "American", website: "albert.com"}, {name: "Alice", isAdult: true, country: "China", website: "alice.com"}, {name: "Bob", isAdult: false, country: "Canada", website: "bob.com"} ]; activeSheet.setDataSource(people);
var activeSheet = spread.getActiveSheet(); var test = [ { "Series0": 2, "Series1": 1 }, { "Series0": 4, "Series1": 2 }, { "Series0": 3, "Series1": 4 } ]; activeSheet.autoGenerateColumns = true; activeSheet.setDataSource(test, true);