Skip to content

Native node.js Excel file parser. Only supports xlsx for now.

Notifications You must be signed in to change notification settings

onimiho/excel.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Excel.js

Native node.js Excel file parser. Only supports xlsx for now.

Install

git clone https://github.com/shibucafe/excel.js.git excel

Use

(edited by @shibucafe)

var parseXlsx = require('excel');

parseXlsx('Spreadsheet.xlsx', function(err, data) {
  if(err) throw err;
  console.log(data);
  // [ { sheetNum: 1, , sheetName: 'hoge', contents: (array of arrays) }, ... ]
});

If you have multiple sheets in your spreadsheet,

parseXlsx('Spreadsheet.xlsx', [2, 3], function(err, data) {
  if (err) throw err; // if sheet2 or sheet3 does not exist, an error occurs
  console.log(data);
  // [ { sheetNum: 2, sheetName: 'hoge', contents: (array of arrays) }, { sheetNum: 3, sheetName: 'hoge', contents: (array of arrays) } ]
});

MIT License.

Author: Trevor Dixon [email protected]

Contributors:

About

Native node.js Excel file parser. Only supports xlsx for now.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%