Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/d-band/better-xlsx

A better xlsx library.
https://github.com/d-band/better-xlsx

excel excel-export excelgenerator nodejs xlsx xlsx-lib xml

Last synced: 6 days ago
JSON representation

A better xlsx library.

Awesome Lists containing this project

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)].

## Backers

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

## 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)]










## License

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