{"id":27550,"library":"webpack-xlsx-loader","title":"webpack-xlsx-loader","description":"Webpack loader that imports and parses .xlsx files into a workbook object compatible with the xlsx npm module. Version 1.0.0 is the initial release with no active development since 2016. It transforms xlsx files into a JSON representation (SheetNames and Sheets) that can be directly consumed by xlsx utility functions. Differentiated by simplicity: just a loader with no extra configuration required. Alternatives include raw xlsx import with file-loader or manual parsing.","status":"deprecated","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/seveibar/xlsx-loader","tags":["javascript"],"install":[{"cmd":"npm install webpack-xlsx-loader","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-xlsx-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-xlsx-loader","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default import returns the workbook object. No named export.","wrong":"import { default } from './path/to/file.xlsx'","symbol":"default","correct":"import spreadsheet from './path/to/file.xlsx'"},{"note":"xlsx is a peer dependency; must be installed separately. ESM import is recommended.","wrong":"const xlsx = require('xlsx')","symbol":"xlsx","correct":"import xlsx from 'xlsx'"}],"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      { test: /\\.xlsx$/, loader: 'webpack-xlsx-loader' }\n    ]\n  }\n};\n\n// app.js\nimport spreadsheet from './data.xlsx';\nimport xlsx from 'xlsx';\n\nconsole.log(spreadsheet.SheetNames); // ['Sheet1']\nconsole.log(xlsx.utils.sheet_to_csv(spreadsheet.Sheets['Sheet1']));","lang":"javascript","description":"Configures webpack to load xlsx files, then imports a spreadsheet and converts first sheet to CSV."},"warnings":[{"fix":"Use a modern replacement like @softarc/xlsx-loader or raw xlsx with asset modules.","message":"No updates since 2016; not compatible with webpack 5+ (deprecated loader API).","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Run npm install xlsx separately.","message":"Requires xlsx as a peer dependency; not automatically installed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use MiniCssExtractPlugin or avoid loaders that intercept pitch.","message":"Webpack 4 loader API changes: pitch phase may break with extract-text-webpack-plugin.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add webpack-xlsx-loader to webpack config as shown in usage.","cause":"Webpack doesn't have a loader for .xlsx files.","error":"Module parse failed: Unexpected token (1:0) in file.xlsx"},{"fix":"Run npm install xlsx.","cause":"xlsx is not installed.","error":"Cannot find module 'xlsx'"},{"fix":"Use import spreadsheet from './file.xlsx' not import { SheetNames } from './file.xlsx'.","cause":"The loader output is a JSON object; must be default imported.","error":"Spreadsheet import is undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}