Created
October 18, 2019 08:10
-
-
Save renso3x/8051a7bddcf789dc327e505c72df8945 to your computer and use it in GitHub Desktop.
excel parser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const XLSX = require('xlsx') | |
const path = require('path') | |
const fs = require('fs') | |
const file = path.join(__dirname, '/rental_units.xlsx') | |
fs.readFile(file, (err, data) => { | |
var wb = XLSX.readFile(file) | |
/* generate array of arrays */ | |
data = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]], { header: 1 }) | |
// console.log(data) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment