Posted 10 August 2018, 2:38 am EST
I am trying this export to .xlsx example for my application. http://help.grapecity.com/spread/SpreadSheets10/JavascriptLibrary~GC.Spread.Excel.IO~save.html
Here the code that i am trying.
vm.spread = vm.spread = new GC.Spread.Sheets.Workbook($document[0].getElementById('test_element'), { sheetCount: 1 });
var fileName = 'test.xlsx';
var json = JSON.stringify(vm.spread.toJSON());
var excelIO = new GC.Spread.Excel.IO();
excelIO.save(json, function (blob) {
console.log(blob) // returning : Blob(6280) {size: 6280, type: "application/zip"}
saveAs(blob, fileName);
}, function (e) {
console.log(e); // Returning error : {errorCode: 1, errorMessage: "Incorrect file format."}
});
