2.1.7 • Published 9 years ago
excellent v2.1.7
excellent
excellent takes the pain out of generating Excel (xlsx) spreadsheets in Javascript.
example
var excellent = require('excellent');
var fs = require('fs');
var dkGreyBorder = {style: 'thin', color: 'Charcoal Gray'};
var doc = excellent.create({
sheets: {
'Summary': {
image: {image: fs.readFileSync(__dirname + '/assets/dog.png'), filename: 'dog.png'},
rows: [{
cells: [
'foo',
{value: 'bar', style: 'bold'},
{value: 'foo', style: 'lemonBg'},
'baz',
{value: 'quux', style: 'lemonBgBold'}
]
}, {
cells: ['', {value: 'WAT?!', style: 'brick'}, {value: 'dotty', style: 'dotty'}]
}]
}
},
styles: {
borders: [{label: 'dkGrey', left: dkGreyBorder, right: dkGreyBorder, top: dkGreyBorder, bottom: dkGreyBorder}],
fonts: [{label: 'bold', bold: true}, {label: 'brick', color: 'Brick Red'}],
fills: [{label: 'lemon', type: 'pattern', color: 'Lemon Glacier'}],
cellStyles: [
{label: 'bold', font: 'bold'},
{label: 'brick', font: 'brick', border: 'dkGrey'},
{label: 'lemonBg', fill: 'lemon'},
{label: 'lemonBgBold', font: 'bold', fill: 'lemon'},
{label: 'dotty', fill: 1}
]
}
});
fs.writeFileSync(__dirname + '/test.xlsx', doc.file);
The result:
2.1.7
9 years ago
2.1.6
10 years ago
2.1.5
10 years ago
2.1.4
10 years ago
2.1.3
10 years ago
2.1.2
10 years ago
2.1.1
10 years ago
2.1.0
10 years ago
2.0.1
10 years ago
2.0.0
10 years ago
1.3.0
10 years ago
1.2.0
10 years ago
1.1.0
10 years ago
1.0.0
10 years ago
0.4.0
10 years ago
0.3.0
10 years ago
0.2.0
10 years ago
0.1.0
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago