Registry / database / xlsx-mysql

xlsx-mysql

JSON →
library1.0.8jsnpmunverified

XLSX-MySQL is a Node.js library (v1.0.8) that compares an XLSX workbook against a MySQL database and applies workbook changes as SQL updates. It wraps the csv-mysql package with XLSX-to-CSV conversion via the xlsx module. The library is experimental and minimally functional: the main export is a function that takes a config object but returns nothing, relies on a sleep-based workaround for sheet processing, and requires exact sheet-to-table and column name matching. No active maintenance or release cadence; known issues remain unfixed. Not recommended for production use.

npm install xlsx-mysql
INSTALL
IMPORT
SIG · XLSX-MYSQL
X
xlsx-mysql
databasejavascriptv1.0.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

xlsx-mysql
const XLSXtoMYSQL = require('xlsx-mysql');
import XLSXtoMYSQL from 'xlsx-mysql';
Package only supports CommonJS require(); ESM import will fail at runtime.

Shows basic usage: import via require(), configure MySQL connection and CSV delimiter, then invoke the main function with file path.

const XLSXtoMYSQL = require('xlsx-mysql'); const options = { locationXLSXtoMYSQL: './export.xlsx', optionsXLSXtoMYSQL: { mysql: { host: '127.0.0.1', user: 'root', database: 'test', password: 'password', port: '3306' }, csv: { delimiter: '+' }, table: 'xlsx' }, }; XLSXtoMYSQL(options);
Debug
Known issues
gotchaMain function does not return anything — cannot chain .then() or use callbacks.
fix
Wrap usage in a custom promise or callback if you need to know when processing completes.
affects: =1.0.8
gotchaUses sleep() in a for loop per number of sheets, causing unpredictable delays and performance issues.
fix
Replace sleep with Promise.all() or a proper async loop with concurrency control.
affects: =1.0.8
gotchaSheet names must exactly match MySQL table names; mismatches silently fail or produce errors.
fix
Rename sheets to match existing table names before processing.
affects: =1.0.8
gotchaColumn names in XLSX must exactly match column names in MySQL table.
fix
Ensure spelling and capitalization of columns match database schema.
affects: =1.0.8
Errors
Common errors & fixes
TypeError: XLSXtoMYSQL is not a function
Attempted ESM import (import XLSXtoMYSQL from 'xlsx-mysql') which returns undefined.
fix
Use CommonJS require: const XLSXtoMYSQL = require('xlsx-mysql');
Error: Cannot find module 'csv-mysql'
Missing peer dependency csv-mysql.
fix
Run: npm install csv-mysql (or yarn add csv-mysql)
Upgrade
Version history
1.0.8latest on npm
Audit
Dependencies
xlsxrequiredReads XLSX files and converts to CSV format
csv-mysqlrequiredUploads CSV content to MySQL database
Agent activity
24 hits · last 30 days
node
20
Meta
1
OpenAI (training)
1
Resources
xlsx-mysql — npm install xlsx-mysql · libregistry