excel2array
v0.1.1
Published
Import data from an excel worksheet to array of objects
Downloads
5
Readme
excel2array
This module extracts data from an Excel worksheet into an array of objects defined by user-mapping. This assumes the worksheet contains data in rows and columns.
Quick start
Install
npm install excel2array
Importing data from an xlsx file, outputs an array of objects
var excel2array = require('excel2array');
var columnMap={
First:['First'],
Last:['Last']
};
var options={
hasHeaderRow: true,
primaryKey: 'First',
removeEmptyRows: true
};
var filePath = 'example.xlsx';
var sheetName = 'Sheet1';
var result = excel2array(filePath, sheetName, columnMap, options);
console.log(result.list);
Contributing
Please submit all pull requests the against master branch. If your unit test contains javascript patches or features, you should include relevant unit tests. Thanks!
Copyright and license
Copyright (C) 2012-2014 Olivier Louvignes
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.