UNPKG

scrapper-tools

Version:

Its in development but I use it in all my web automation project.

9 lines (7 loc) 258 B
import xlsx from 'xlsx' import fs from 'fs' export default (path) => { const table = xlsx.read(fs.readFileSync(path), { type: 'buffer' }) var sheet_name_list = table.SheetNames return xlsx.utils.sheet_to_json(table.Sheets[sheet_name_list[0]]) }