Explorar o código

update xlsx文档改成xls

linweizeng %!s(int64=2) %!d(string=hai) anos
pai
achega
258128b1e7
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      src/plugins/export/_export2Excel.js

+ 4 - 2
src/plugins/export/_export2Excel.js

@@ -141,7 +141,9 @@ export function export_json_to_excel(th, jsonData, defaultTitle, options = { mer
   wb.SheetNames.push(ws_name)
   wb.Sheets[ws_name] = ws
 
-  var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' })
+//   var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' })
+  var wbout = XLSX.write(wb, { bookType: 'xls', bookSST: false, type: 'binary' })
   var title = defaultTitle || '列表'
-  FileSaver.saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), title + '.xlsx')
+//   FileSaver.saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), title + '.xlsx')
+FileSaver.saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), title + '.xls')
 }