{"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,"search_vec":"'1.0.0':24 '2016':34 'activ':31 'altern':66 'compat':17 'configur':64 'consum':50 'develop':32 'differenti':55 'direct':49 'extra':63 'file':12,38,73 'file-load':72 'function':54 'import':8,70 'includ':67 'initi':27 'javascript':78 'json':41 'loader':4,6,60,74 'manual':76 'modul':22 'npm':21 'object':16 'pars':10,77 'raw':68 'releas':28 'represent':42 'requir':65 'sheet':45 'sheetnam':43 'simplic':57 'sinc':33 'transform':36 'util':53 'version':23 'webpack':2,5 'webpack-xlsx-load':1 'workbook':15 'xlsx':3,11,20,37,52,69","created_at":"2026-05-01T17:46:50.937576+00:00","updated_at":"2026-05-01T17:46:50.937576+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/seveibar/xlsx-loader","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/webpack-xlsx-loader","openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-04-25","next_check":"2026-07-24","install_tag":null}}