3.1.0 • Published 6 months ago

@neovici/nullxlsx v3.1.0

Weekly downloads
187
License
MIT
Repository
github
Last release
6 months ago

NullXlsx

Build Status Maintainability Test Coverage Published on webcomponents.org semantic-release

Minimal JavaScript library to create XLSX spreadsheet and ZIP archive files.

No dependencies, focused on library size only. Weights 10k minimized, 3k zipped.

Example usage

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

// Create xlsx
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'));

Distributables

The "dist" directory has three files:

FileSize (gz)Description
nullzip.min.js4k (1.7k)ZIP creator only
nullxlsxonly.min.js9.9k (3.3k)XLSX creator only (ZIP parts are there but not exposed)
nullxlsx.min.js10k (3.4k)Both

Development

Currently this is a node module, only to get closure compiler neatly integrated.

There is a doubt that this works with "require".

Make a clone and then run yarn to prepare.

Edit the files in src/.

Compile again by re-running yarn.

Tests

To run tests locally, run yarn test.