Export JavaScript Array To XLS And CSV – xlsexport

Category: Javascript | June 29, 2017
Author: deblanco
Views Total: 1,915
Official Page: Go to website
Last Update: June 29, 2017
License: MIT

Preview:

Export JavaScript Array To XLS And CSV – xlsexport

Description:

xlsexport.js is a small, zero-dependency library which allows exporting JavaScript array (containing any number of objects) to Excel files (XLS and CSV).

How to use it:

Include the following JavaScript ‘xls-export.js’ onto your html page:

<script src="xls-export.js"></script>

Initialize the xlsexport and pass the following parameters to the ‘xlsExport’ object.

  • data: JS object arrays;
  • title: title (optional);
const xls = new xlsExport(data, title);

Export the JS object arrays to XLS:

xls.exportToXLS('export.xls')

Export the JS object arrays to CSV:

xls.exportToCSV()

Leave a Reply