# parse-xl

> parse an excel file

Latest version **1.0.1** (published 2014-10-01) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install parse-xl
pnpm add parse-xl
yarn add parse-xl
bun add parse-xl
```

Provides the command `parse-xl`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-10-01 |
| First published | 2014-09-30 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | joyrexus |
| Maintainers | joyrexus |
| Keywords | parse, xlsx, xls, excel, ndjson |

## Links

- npm: https://www.npmjs.com/package/parse-xl
- Repository: https://github.com/joyrexus/parse-xl
- Issues: https://github.com/joyrexus/parse-xl/issues
- npm.io page: https://npm.io/package/parse-xl

## Dependencies (3)

- [j](https://npm.io/package/j.md) ~0.3.14
- [tape](https://npm.io/package/tape.md) ~3.0.0
- [minimist](https://npm.io/package/minimist.md) ~1.1.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-10-01
- 1.0.0 — 2014-09-30

## README

# parse-xl

A simple module and CLI for parsing tabular data in an excel worksheet.

The parser assumes that the first line of your table contains column headers:

![sample file](sample.png)


## Usage

    npm install -g parse-xl
    npm run test
    npm run demo
    npm run cli-demo

The CLI (`bin/parse-xl.js`) takes an excel file as input and generates newline-delimited JSON as output:

    parse-xl --sheet=Transcript sample.xlsx

This outputs ...

```json
{ "_ID": "22", "ROW": "1", "LRB": "L",     "XYZ": "x" }
{ "_ID": "22", "ROW": "2", "LRB": "L+L",   "XYZ": "y" }
{ "_ID": "22", "ROW": "3", "LRB": "L+ ",   "XYZ": "z" }
{ "_ID": "22", "ROW": "4", "LRB": "L+R+B", "XYZ": "q" }
{ "_ID": "22", "ROW": "5", "LRB": "L+R+X", "XYZ": "b" }
```

The module can be used to get particular column values or to stream records:

```javascript
var Parser = require('parse-xl'),
    sample = new Parser('sample.xlsx');

// get values in a column
console.log(
  '\nValues in column `XYZ` of `Transcript`:', 
  sample.values('Transcript', 'XYZ'), 
  '\n'
);

// stream parsed records as line-delimited JSON
sample.recordStream('Transcript').pipe(process.stdout);
```

Output ...

    Values in column `XYZ` of `Transcript`: [ 'x', 'y', 'z', 'q', 'b' ] 

    {"_ID":"22","ROW":"1","LRB":"L","XYZ":"x"}
    {"_ID":"22","ROW":"2","LRB":"L+L","XYZ":"y"}
    {"_ID":"22","ROW":"3","LRB":"L+ ","XYZ":"z"}
    {"_ID":"22","ROW":"4","LRB":"L+R+B","XYZ":"q"}
    {"_ID":"22","ROW":"5","LRB":"L+R+X","XYZ":"b"}


## See Also

* [`valid-records`](https://github.com/joyrexus/valid-records) - validate
  specified fields within a set of records (ndjson)
* [`valid-xl`](https://github.com/joyrexus/valid-xl) - validate values in
  columns of an excel worksheet

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