Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var xl = require('excel4node');
- var wb = new xl.Workbook();
- var ws = wb.addWorksheet('test');
- // Create a reusable style
- var style = wb.createStyle({
- numberFormat: '#.00%; -#.00%; -'
- });
- ws.cell(1,1).number(10).style(style); // displays as 1000.00%
- ws.cell(2,1).number(1).style(style); // displays as 100.00%
- ws.cell(3,1).number(.1).style(style); // displays as 10.00%
- ws.cell(4,1).number(.001).style(style); // displays as .10%
- wb.write('NumFormat.xlsx');
Add Comment
Please, Sign In to add comment