better-xlsx

0.7.6 • Public • Published

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
  • [x] write excel file
  • [x] 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.

Package Sidebar

Install

npm i better-xlsx

Weekly Downloads

3,833

Version

0.7.6

License

MIT

Unpacked Size

585 kB

Total Files

37

Last publish

Collaborators

  • d-band