- var spread = new GC.Spread.Sheets.Workbook(document.getElementById('ss'));
- var excelIo = new GC.Spread.Excel.IO();
- var json = spread.toJSON();
- <font color="#006400"> // here is excel IO API</font>
- var fileName = '1'
- if (fileName.substr(-5, 5) !== '.xlsx') {
- fileName += '.xlsx';
- }
- excelIo.save(json, function (blob) {
- saveAs(blob, fileName);
- console.log(blob)
- }, function (e) {
- // process error
- console.log(e)
- })
复制代码
|
|