# sxi

> Command Line Tool for importing data from xlsx file using configured pattern and defined typescript types

Latest version **0.0.3** (published 2021-08-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install sxi
pnpm add sxi
yarn add sxi
bun add sxi
```

Provides the command `sxi`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2021-08-29 |
| First published | 2020-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 179 |
| Author | Paweł Siemienik |
| Maintainers | siemienik |
| Keywords | xlsx, cli, excel, template, spreadsheet, sheet, Importing data, ExcelJs, configuration, spread, data, import xlsx |

## Links

- npm: https://www.npmjs.com/package/sxi
- Repository: https://github.com/Siemienik/XToolset
- Homepage: https://github.com/Siemienik/XToolset#readme
- Issues: https://github.com/Siemienik/XToolset/issues
- Funding: https://github.com/sponsors/Siemienik
- npm.io page: https://npm.io/package/sxi

## Dependencies (2)

- [commander](https://npm.io/package/commander.md) ^6.2.1
- [xlsx-import](https://npm.io/package/xlsx-import.md) ^2.3.6

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2021-08-29
- 0.0.2 — 2021-08-14
- 0.0.1 — 2021-06-15
- 0.0.1-alpha1b — 2021-01-03
- 0.0.1-alpha1 — 2021-01-02
- 0.0.1-0 — 2020-08-15

## README

# XLSX Import - Command Line Interface

[![NPM](https://img.shields.io/npm/l/sxi)![npm](https://img.shields.io/npm/v/sxi)](https://www.npmjs.com/package/sxi) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/siemienik/xtoolset/xlsx-import-cli)](https://github.com/Siemienik/xtoolset/actions)

Command line interface for [xlsx-import](../xlsx-import). Configurable import spreadsheet files with TS types support.

Part of [XToolSet](https://github.com/siemienik/XToolSet) - collection of tools makes handling spreadsheet handy, easy with great developer experience.

## Usages

### Global installation

```shell script
# Install globally:

npm i -g sxi

# Usages:

sxi config.js invoice.xlsx > result.json
```

### Local installation

#### 1. Install package

```shell script
# 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:`

```json
{
    "scripts": {
        "import-xlsx":"sxi config.js invoice.xlsx > result.json"
    }
}
```

bash:

```shell script
npm run import-xlsx
```

## Examples

```shell script
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:](../../samples/xlsx-import-cli)

## Command body

`sxi [options] <config.js> [input.xlsx]`

### Arguments

* `<config.js>` indicate  the config file.
* `[input.xlsx]` data source.

<!---
### Options

* `-o --output <output-file.json>` write output json into file.
--->

### Output

The `sxi` writes into `stdout` imported data as a json, to save it into a file please to append `> filename.json`.

<!---
Library allowing also save output into file by using option `-o --output <output-file.json>`
--->

It is also allowed using pipe parameter to forward imported data into another command.

## The Configuration File

The config inherit from `xlsx-import`. Please use link below for more information:

[**XLSX Import Documentation**](https://github.com/Siemienik/XToolSet/tree/master/packages/xlsx-import#xlsx-import)

## Support

If any help needed, just feel free to create an issue. We will be really thankful for added links into stackoverflow topics if exists.

We are ready to provide paid support, in order that please contact me: [hi@siemienik.pl](mailto://hi@siemienik.pl) or [support@siemienik.pl](mailto://support@siemienik.pl).

---

* [MIT LICENSE](LICENSE)

---
_Source: https://npm.io/package/sxi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
