Is it possible to use any HTML5 fanciness to export local storage to Excel?

前端 未结 2 2031
生来不讨喜
生来不讨喜 2020-11-27 16:52

This question is similar, but doesn\'t highlight any possibilities to export the data. Thoughts?

2条回答
  •  失恋的感觉
    2020-11-27 17:30

    I'm not aware of any Javascript libraries which can make an Excel file. But you could simply export it as HTML or CSV - note that Javascript cannot make files (yet), but the working draft of HTML caters for this: http://www.w3.org/TR/file-writer-api/

    Excel is quite good at reading tables made in HTML, so you could simply do that and open the HTML file with Excel.

    You can create a file for download using Downloadify: https://github.com/dcneiner/Downloadify

提交回复
热议问题