myliang/x-spreadsheet

how can i export the spreadsheet as xlsx file?

Leedorado opened this issue · 5 comments

how can i export the spreadsheet as xlsx file?

This requires the support of the background program, what good advice do you have?

I think you can create the file in memory and then use a data uri to give the user something they can click. The browser should be able to take care of the rest.

see #8

an alternative is exceljs

qinrr commented

When can excel be exported

https://docs.sheetjs.com/docs/demos/grid#x-spreadsheet discusses in more detail

Hosted script https://cdn.sheetjs.com/xspreadsheet/xlsxspread.min.js

Script exposes a function xtos. Usage:

// var grid = x_spreadsheet(...);
XLSX.writeFile(xtos(grid.getData()), "SheetJS.xlsx");