1.0.0 • Published 7 years ago
webpack-xlsx-loader v1.0.0
Webpack XLSX Loader
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
1.0.0
7 years ago