mgcrea/node-xlsx — pull request #3 by caiguanhao (2013-11-21 12:14:48+00:00)
Title: Add options to customize the cells and the page.

Code example:

var xlsx = require('node-xlsx');
var buffer = xlsx.build({ worksheets: [{
name: 'sheet',
data: [
[{
value: 'example',
colWidth: 14
}]
]
}] }, {
defaultFontName: 'Arial',
defaultFontSize: 10,
defaultHAlign: 'center',
defaultVAlign: 'center',
defaultCellBorders: { left: '000', right: '000', top: '000', bottom: '000' }, // hex color code
page: {
margins: { left: 0.5, right: 0.5, top: 0.5, bottom: 0.5, header: 0.1, footer: 0.1 }, // in inch
paper_size: 9, // http://msdn.microsoft.com/en-us/library/office/ff839964.aspx
orientation: 'landscape' // landscape or portrait
}
});