Skip to content
A better xlsx library.
JavaScript
Branch: master
Clone or download
Latest commit ed36d8a May 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist update dependents May 21, 2019
docs add docs Jul 19, 2017
examples
src version 0.7.3 Nov 29, 2018
test remove header May 31, 2018
.babelrc constructor bug fixed Nov 29, 2018
.editorconfig init Nov 10, 2016
.esdoc.json esdoc config changed Aug 3, 2017
.eslintrc bug fixed May 2, 2017
.gitignore remove package lock Nov 29, 2018
.npmignore version 0.7.3 Nov 29, 2018
.travis.yml
README.md Added backers and sponsors on the README Apr 12, 2018
constructor-name.js version 0.7.3 Nov 29, 2018
package.json version 0.7.4 May 21, 2019
rollup.config.js constructor bug fixed Nov 29, 2018

README.md

better-xlsx

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

NPM version NPM downloads Build Status Coverage Status Dependency Status Greenkeeper badge Backers on Open Collective Sponsors on Open Collective


Install

$ npm install better-xlsx

Usage

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
  • write excel file
  • transform html table to excel file html2xlsx

Report a issue

Reference

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

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

You can’t perform that action at this time.