XLSX & Zip Archive Generator With JavaScript – NullXlsx

Category: Javascript | October 9, 2018
Author: Neovici
Views Total: 857
Official Page: Go to website
Last Update: October 9, 2018
License: MIT

Preview:

XLSX & Zip Archive Generator With JavaScript – NullXlsx

Description:

The NullXlsx JavaScript library helps you dynamically generate XLSX files and Zip archives on the client side.

How to use it:

Include the needed JavaScript file on the web page.

<script src="nullxlsx.min.js"></script>
<!-- OR -->
<script src="nullxlsxonly.min.js"></script>
<!-- OR -->
<script src="nullzip.min.js"></script>

The JavaScript to create an XLSX and generate a download link on the web page.

// Data should be array of array
var data = [['Title 1', 'Title 2'], 
  ['Carl', 12.4, new Date(2017, 7 - 1, 10)], 
  ['Mia', 678, new Date()]
];

// Create xlsl
var xlsx = new NullXlsx('test.xlsx')
  .addSheetFromData(data, 'Sheet name');

// Generate a link to download the file
document.body.appendChild(xlsx.createDownloadLink('Download test.xlsx'));

Changelog:

10/09/2018

  • Refactor

You Might Be Interested In:


Leave a Reply