1.0.0 • Published 6 years ago

webpack-xlsx-loader v1.0.0

Weekly downloads
314
License
MIT
Repository
github
Last release
6 years ago

Webpack XLSX Loader

Build Status

Imports and parses xlsx files for usage with the xlsx npm module.

Install

npm install --save-dev webpack-xlsx-loader

Usage

Add a rule to your webpack config.

module.exports = {
  module: {
    rules: [
      { test: /\.xlsx$/, loader: "webpack-xlsx-loader" }
    ]
  }
}

You can then directly import and use xlsx to manipulate your excel spreadsheet (if you need more complicated functionality).

import spreadsheet from './spreadsheet.xlsx'
import xlsx from 'xlsx'

console.log(spreadsheet.SheetNames) // ['Sheet1']

const csvString = xlsx.utils.sheet_to_csv(spreadsheet.Sheets['Sheet1'])

License

MIT © Severin Ibarluzea