webpack-xlsx-loader

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-xlsx-loader

Weekly Downloads

723

Version

1.0.0

License

MIT

Last publish

Collaborators

  • seveibar