simple-excel-reader

1.0.6 • Public • Published

Simple Excel Reader (simple-excel-reader)

Simple node.js excel file (.xlsx) data extractor for "row oriented" data files

Installation

npm install --save simple-excel-reader

Usage

// SETUP
const ExcelReader = require('simple-excel-reader')
const filePath = './directory/filename.xlsx'
const excelReader = new ExcelReader(filePath)
 
// DATA EXTRACTION
// get the full workbook recordsets
excelReader
  .getWorkbook()
  .then(recordsets => {
    console.log(recordsets)
    // get the name of each worksheet
    return excelReader.getWorksheetNames()
  })
  .then(worksheetNames => {
    console.log(worksheetNames)
    // get the records from a particular worksheet
    return excelReader.getWorksheet(worksheetNames[2])
  })
  .then(records => console.log(records))
  .catch(error => console.error(error))

API

new ExcelReader(filePath, delimiter)

instance.getWorkbook()

instance.getWorksheetNames()

instance.getWorksheet(worksheetName)

Readme

Keywords

none

Package Sidebar

Install

npm i simple-excel-reader

Weekly Downloads

21

Version

1.0.6

License

MIT

Unpacked Size

6.13 kB

Total Files

4

Last publish

Collaborators

  • juniorcitizen