Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/d-band/better-xlsx
- Owner: d-band
- Created: 2016-11-10T10:22:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-07-30T01:53:45.000Z (over 3 years ago)
- Last Synced: 2024-05-22T11:39:25.286Z (7 months ago)
- Topics: excel, excel-export, excelgenerator, nodejs, xlsx, xlsx-lib, xml
- Language: JavaScript
- Homepage: https://d-band.github.io/better-xlsx/
- Size: 1.66 MB
- Stars: 420
- Watchers: 17
- Forks: 36
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
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.