fix filename bug

pull/858/head
Pan 2018-07-11 14:12:47 +08:00
parent 5fbf1cf5da
commit bcd6d5441a
1 changed files with 2 additions and 1 deletions

View File

@ -116,8 +116,9 @@ export function export_table_to_excel(id) {
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx") saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx")
} }
export function export_json_to_excel({header, data, filename='excel-list', autoWidth=true}={}) { export function export_json_to_excel({header, data, filename, autoWidth=true}={}) {
/* original data */ /* original data */
filename=filename||'excel-list'
data=[...data] data=[...data]
data.unshift(header); data.unshift(header);
var ws_name = "SheetJS"; var ws_name = "SheetJS";