SkillAgentSearch skills...

XlsExport

Javascript library for exporting object arrays to Excel XLS and CSV.

Install / Use

/learn @deblanco/XlsExport
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

xlsexport

Javascript library for exporting object arrays to Excel XLS and CSV.

Installation

Clone or download the Github repo or via bower:

bower install xlsexport

or

npm install xlsexport

Usage

xlsExport is defined as a class, so has to be instantiated with data (objects array) and an optional title.

var xls = new XlsExport([..., Object], String);

Since Chromium(v61) supports ES6 Modules, XlsExport is available with 'import' syntax 😎. For older browsers I also include an ES5 version inside the package.

Methods:

  • exportToXLS(String fileName): convert data and force download of a Excel XLS file.
  • exportToCSV(String fileName): convert data separate by semi-colons and force download of a CSV file.

fileName parameter is optional, if it's not defined, the file will be named "export.xls".

Example

import XlsExport from './xls-export.js';

var xls = new XlsExport([..., Object], String);
xls.exportToXLS('export2017.xls');
xls.exportToCSV('export2017.xls');

Demo: https://jsfiddle.net/3xvb2g5w/


License: MIT

View on GitHub
GitHub Stars42
CategoryDevelopment
Updated12mo ago
Forks21

Languages

JavaScript

Security Score

72/100

Audited on Apr 3, 2025

No findings