Export JavaScript Array To XLS And CSV – xlsexport

Category: Javascript | October 5, 2018
Author: deblanco
Views Total: 2,879
Official Page: Go to website
Last Update: October 5, 2018
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).

Installation:

# NPM
$ npm install xlsexport --save

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()

Changelog:

10/05/2018

  • Fix XLS problems with larger files

Leave a Reply