CSVx.js

Is an open source CSV Export library written in TypeScript.

About

The purpose of this library is to provide an easy way to export your data as CSV.

You can help develop CSVx.js on Github.

Example

Code

Javascript (main.js)

Create a button to export a CSV.

var array = [
  {
    firstname:'Galileo',
    lastname:'Galilei',
    born:1564,
    died:1642
  },
  {
    firstname:'Nikola',
    lastname:'Tesla',
    born:1856,
    died:1943
  },
  {
    firstname:'Albert',
    lastname:'Einstein',
    born:1879,
    died:1955
  }
];

var exportButton = Wee.Dom.findById('csv');
exportButton.addEventListener('click', function() {
  CSVx.Export.data('scientists',array);
});

Contact me

Feel free to ask me about my work, give me suggestions, or just to say hi.