Commit eccb98ba authored by neo's avatar neo

[dev] download report excel sheet

parent c42e9379
......@@ -1033,17 +1033,17 @@
mainSpread.sheets.push(currentSheet);
}
var dataObj = {
"spread": mainSpread.toJSON(),
"exportFileType": "xlsx"
};
var content = JSON.stringify(dataObj);
dataObj = null;
vatExportService.exportReport(content).success(function (data) {
window.open(loginContext.vatApiHost + '/' + data);
var excelIo = new GC.Spread.Excel.IO();
// here is excel IO API
excelIo.save(mainSpread.toJSON(), function (blob) {
saveAs(blob, 'ttt.xlsx');
}, function (e) {
alert(e);
});
// vatExportService.exportReport(content).success(function (data) {
// window.open(loginContext.vatApiHost + '/' + data);
// });
$('.export-container').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