sxi
v0.0.3
Published
Command Line Tool for importing data from xlsx file using configured pattern and defined typescript types
Downloads
8
Maintainers
Readme
XLSX Import - Command Line Interface
Command line interface for xlsx-import. Configurable import spreadsheet files with TS types support.
Part of XToolSet - collection of tools makes handling spreadsheet handy, easy with great developer experience.
Usages
Global installation
# Install globally:
npm i -g sxi
# Usages:
sxi config.js invoice.xlsx > result.json
Local installation
1. Install package
# install globally:
npm i --save sxi
# usages:
node_modules/.bin/sxi config.js invoice.xlsx > result.json
# usages with npx
npx sxi config.js invoice.xlsx > result.json
2. Additionally, possible to use with packages.json scripts
package.json:
{
"scripts": {
"import-xlsx":"sxi config.js invoice.xlsx > result.json"
}
}
bash:
npm run import-xlsx
Examples
sxi config.js invoice.xlsx > result.json
# Additionally, great piping with xlsx-renderer-cli: (required `sxr` installed)
sxi config.js invoice.xlsx | sxr template.xlsx > refreshed-invoice.xlsx
Run prepared examples! :rocket:
Command body
sxi [options] <config.js> [input.xlsx]
Arguments
<config.js>
indicate the config file.[input.xlsx]
data source.