Commit eccb98ba authored by neo's avatar neo

[dev] download report excel sheet

parent c42e9379
...@@ -1033,17 +1033,17 @@ ...@@ -1033,17 +1033,17 @@
mainSpread.sheets.push(currentSheet); mainSpread.sheets.push(currentSheet);
} }
var dataObj = { var excelIo = new GC.Spread.Excel.IO();
"spread": mainSpread.toJSON(), // here is excel IO API
"exportFileType": "xlsx" excelIo.save(mainSpread.toJSON(), function (blob) {
}; saveAs(blob, 'ttt.xlsx');
}, function (e) {
var content = JSON.stringify(dataObj); alert(e);
dataObj = null;
vatExportService.exportReport(content).success(function (data) {
window.open(loginContext.vatApiHost + '/' + data);
}); });
// vatExportService.exportReport(content).success(function (data) {
// window.open(loginContext.vatApiHost + '/' + data);
// });
$('.export-container').html(''); $('.export-container').html('');
$('#export').html(''); $('#export').html('');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment