1.0.0 • Published 5 years ago
sheet2sql v1.0.0
sheet2sql.js
A node module for generating sql from sheet document (xls, xslx, csv...)
Table of Contents
Installation Instructions Usage Configuration Demo Support Notes
Installation-instructions
From npm: npm install sheet2sql
Usage
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
Configuration
Demo
From root folder, go to demo folder
cd demo
Run demo scriptnode demo.js
Query file will be generated from demo/mission.xlsxScripts will be generated under sub folder
demo-with-config
: run exporter with a configurationdemo-no-config
: run exporter with default configuration