var sheet = spread.getActiveSheet();
const dataSource = [{
'A': '1.2586105847E8',
'B': '-1.63E7'
}];
sheet.setDataSource(dataSource);
let style = new GC.Spread.Sheets.Style();
// #,##0.00; > 0格式 [Red]#,##0.00; < 0的格式
style.formatter = '#,##0.00;[Red]#,##0.00;';
sheet.setStyle(-1, 0, style);
sheet.setStyle(-1, 1, style);
spread.resumePaint();
导出
var json = spread.toJSON({includeBindingSource: true, saveAsView: true});
[url=]console.log(JSON.stringify(json));[/url]
|
|