A node module for generating sql from sheet document (xls, xslx, csv...)
Installation Instructions
Usage
Configuration
Demo
Support
Notes
From npm: npm install sheet2sql
Require module:
const sheet2Sql = require("sheet2sql");
To generating mysql insert queries:
sheet2sql.exportInsert(sqlDialect, sheetFile, config, outputFolder);
sqlDialect
: currently supportpostgres
sheetFile
: path to sheet fileconfig
: exporting config,null
to use default configoutputFolder
Folder for generated SQL queries
Config object has fields that map a sheet name to this sheet parsing config. { "Sheet1": {} }
SheetConfig {
}
From root folder, go to demo folder
cd demo
Run demo script
node demo.js
Query file will be generated from demo/mission.xlsx
Scripts will be generated under sub folder
demo-with-config
: run exporter with a configuration
demo-no-config
: run exporter with default configuration