3

I am using papa parse library. It helped me in converting JSON to CSV but how can I download the same data into a excel file. My data is huge

Maverick
  • 59
  • 2
  • 11
  • If you're searching just how to make the download this could help http://stackoverflow.com/a/3665147/4682556 – Dan May 09 '16 at 04:49

2 Answers2

5

If I'm understanding your question correctly, you have a CSV file which you now want to tell the browser to download? Have you looked at https://github.com/eligrey/FileSaver.js/ ? Allows you to tell the browser to download a wide variety of files.

An example in using it:

var blob = new Blob(myBigCSVFile, {type: "text/csv;charset=utf-8"});
saveAs(blob, "file.csv");

The browser, upon reaching the saveAs function will download the file you specified.

qwelyt
  • 776
  • 9
  • 23
0

Checkout SheetJS/js-xlsx library.

Supported read formats: Excel 2007+ XML Formats (XLSX/XLSM), Excel 2007+ Binary Format (XLSB), Excel 2003-2004 XML Format (XML "SpreadsheetML"), Excel 97-2004 (XLS BIFF8), Excel 5.0/95 (XLS BIFF5), OpenDocument Spreadsheet (ODS)

Supported write formats: XLSX, CSV (and general DSV), JSON and JS objects (various styles)

Papa
  • 1,628
  • 1
  • 11
  • 16