# better-xlsx

> A better xlsx lib for read / write / toTable / from Table

Latest version **0.7.6** (published 2021-07-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install better-xlsx
pnpm add better-xlsx
yarn add better-xlsx
bun add better-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.7.6 |
| Published | 2021-07-29 |
| First published | 2016-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4 |
| Dependencies | 3 |
| Unpacked size | 571.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 420 |
| Author | d-band |
| Maintainers | d-band |
| Keywords | xlsx, excel, html, read, write |

## Links

- npm: https://www.npmjs.com/package/better-xlsx
- Repository: https://github.com/d-band/better-xlsx
- Homepage: https://github.com/d-band/better-xlsx#readme
- Issues: https://github.com/d-band/better-xlsx/issues
- npm.io page: https://npm.io/package/better-xlsx

## Dependencies (3)

- [jszip](https://npm.io/package/jszip.md) ^3.2.2
- [kind-of](https://npm.io/package/kind-of.md) ^6.0.3
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.8.4

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.7.6 (latest) — 2021-07-29
- 0.7.5 — 2020-02-04
- 0.7.4 — 2019-05-21
- 0.7.3 — 2018-11-29
- 0.7.2 — 2018-11-29
- 0.7.1 — 2018-11-08
- 0.7.0 — 2018-05-31
- 0.6.0 — 2018-04-09
- 0.5.0 — 2018-03-28
- 0.4.0 — 2017-10-20
- 0.3.8 — 2017-08-15
- 0.3.7 — 2017-08-03
- 0.3.6 — 2017-07-19
- 0.3.5 — 2017-07-19
- 0.3.4 — 2017-07-11
- … 9 more at https://npm.io/package/better-xlsx/versions

## README

better-xlsx
===========

> A better xlsx lib for read / write / toTable / from Table

[![NPM version](https://img.shields.io/npm/v/better-xlsx.svg)](https://www.npmjs.com/package/better-xlsx)
[![NPM downloads](https://img.shields.io/npm/dm/better-xlsx.svg)](https://www.npmjs.com/package/better-xlsx)
[![Build Status](https://travis-ci.org/d-band/better-xlsx.svg?branch=master)](https://travis-ci.org/d-band/better-xlsx)
[![Coverage Status](https://coveralls.io/repos/github/d-band/better-xlsx/badge.svg?branch=master)](https://coveralls.io/github/d-band/better-xlsx?branch=master)
[![Dependency Status](https://david-dm.org/d-band/better-xlsx.svg)](https://david-dm.org/d-band/better-xlsx)
[![Greenkeeper badge](https://badges.greenkeeper.io/d-band/better-xlsx.svg)](https://greenkeeper.io/)
[![Backers on Open Collective](https://opencollective.com/better-xlsx/backers/badge.svg)](#backers) 
[![Sponsors on Open Collective](https://opencollective.com/better-xlsx/sponsors/badge.svg)](#sponsors) 

---

## Install

```bash
$ npm install better-xlsx
```

## Usage

- [More Examples](examples)

```javascript
const fs = require('fs');
const xlsx = require('better-xlsx');

const file = new xlsx.File();

const sheet = file.addSheet('Sheet1');
const row = sheet.addRow();
const cell = row.addCell();

cell.value = 'I am a cell!';
cell.hMerge = 2;
cell.vMerge = 1;

const style = new xlsx.Style();

style.fill.patternType = 'solid';
style.fill.fgColor = '00FF0000';
style.fill.bgColor = 'FF000000';
style.align.h = 'center';
style.align.v = 'center';

cell.style = style;

file
  .saveAs()
  .pipe(fs.createWriteStream('test.xlsx'))
  .on('finish', () => console.log('Done.'));
```

## Todo

- [ ] xlsx parser
- [ ] read excel file
- [x] write excel file
- [x] transform html table to excel file [html2xlsx](https://github.com/d-band/html2xlsx)

## Report a issue

* [All issues](https://github.com/d-band/better-xlsx/issues)
* [New issue](https://github.com/d-band/better-xlsx/issues/new)

## Reference

- http://www.ecma-international.org/publications/standards/Ecma-376.htm
- https://github.com/tealeg/xlsx

## Contributors

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="graphs/contributors"><img src="https://opencollective.com/better-xlsx/contributors.svg?width=890&button=false" /></a>


## Backers

Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/better-xlsx#backer)]

<a href="https://opencollective.com/better-xlsx#backers" target="_blank"><img src="https://opencollective.com/better-xlsx/backers.svg?width=890"></a>


## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/better-xlsx#sponsor)]

<a href="https://opencollective.com/better-xlsx/sponsor/0/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/1/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/2/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/3/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/4/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/5/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/6/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/7/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/8/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/better-xlsx/sponsor/9/website" target="_blank"><img src="https://opencollective.com/better-xlsx/sponsor/9/avatar.svg"></a>



## License

better-xlsx is available under the terms of the MIT License.

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