# async-xlsx

> Node.js excel parser & builder with async support

Latest version **0.0.7** (published 2014-10-27) · Apache License, Version 2.0 license · 0 weekly downloads

## Install

```sh
npm install async-xlsx
pnpm add async-xlsx
yarn add async-xlsx
bun add async-xlsx
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2014-10-27 |
| First published | 2014-10-26 |
| Weekly downloads | 0 |
| License | Apache License, Version 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jose Barrios |
| Maintainers | josebarrios |
| Keywords | excel, xlsx, async |

## Links

- npm: https://www.npmjs.com/package/async-xlsx
- Repository: https://github.com/JoseBarrios/async-xlsx
- Issues: https://github.com/JoseBarrios/async-xlsx/issues
- npm.io page: https://npm.io/package/async-xlsx

## Dependencies (4)

- [xlsx](https://npm.io/package/xlsx.md) ^0.7.10
- [each-async](https://npm.io/package/each-async.md) 1.1.0
- [lodash.map](https://npm.io/package/lodash.map.md) ^2.4.1
- [lodash.defaults](https://npm.io/package/lodash.defaults.md) ^2.4.1

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.0.7 (latest) — 2014-10-27
- 0.0.6 — 2014-10-27
- 0.0.5 — 2014-10-26
- 0.0.4 — 2014-10-26
- 0.0.3 — 2014-10-26
- 0.0.2 — 2014-10-26

## README

[async-xlsx](https://github.com/JoseBarrios/async-xlsx) 
=================

Adds [async](https://www.npmjs.org/package/each-async) support to [node-xlsx](http://mgcrea.github.com/node-xlsx).

Quick start
-----------

Parsing a xlsx from file/buffer
```javascript
var xlsx = require('async-xlsx');

//  ------------------ Synchronous ----------------------------
// Covert excel file to JSON object
var obj = xlsx.parse(__dirname + '/myFile.xlsx'); 
// Convert excel file to buffer
var buffer = xlsx.parse(fs.readFileSync(__dirname + '/myFile.xlsx')); 
// Returns a buffer
var data = [[1,2,3],[true, false, null, 'sheetjs'],['foo','bar',new Date('2014-02-19T14:30Z'), '0.3']];
var buffer = xlsx.build([{name: "mySheetName", data: data}]); 



//  ------------------ Asynchronous ----------------------------
// Transform an Excel file to JSON or an 2D array (async)
xlsx.parseFileAsync(__dirname + '/myFile.xlsx', {options}, function(parsedObject){
	// Callbacks happens when the Excel data is fully loaded and ready for use	
});

//  ------------------ Asynchronous ----------------------------
// Easily build an Excel document from a 2D array (async)
xlsx.buildAsync( [{name: "SheetName", data: [[2D][array]] }], {options}, function(error, xlsBuffer) {
	if(!error){
		// Buffer is ready.
	}
});

```

Building a plist from an object
```javascript
var xlsx = require('async-xlsx');

var data = [[1,2,3],[true, false, null, 'sheetjs'],['foo','bar',new Date('2014-02-19T14:30Z'), '0.3']];
var buffer = xlsx.build([{name: "mySheetName", data: data}]); // returns a buffer

```

Testing
-------

`async-xlsx` is tested with `nodeunit`.

>
	npm install --dev
	npm test

Contributing
------------

Please submit all pull requests the against master branch. If your unit test contains javascript patches or features, you should include relevant unit tests. Thanks!

Authors
-------
[Jose Barrios] (https://github.com/JoseBarrios)


License
---------------------

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.

  Except where noted, this license applies to any and all software programs and associated documentation files created by the Original Author and distributed with the Software:

  'async-xlsx' is a modified version of SheetJS gist examples, Copyright (c) SheetJS.

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