libxl
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "libxl bindings for node", | ||
@@ -8,0 +8,0 @@ "keywords": ["excel", "libxl", "spreadsheet"], |
27
test.js
@@ -11,18 +11,29 @@ var xl = require('./lib/libxl'); | ||
var format2 = book.addFormat(format1); | ||
var format3 = book.addFormat().setNumFormat(book.addCustomNumFormat('###()')); | ||
console.log(format2.numFormat(), xl.NUMFORMAT_PERCENT, format3.numFormat()); | ||
var format3 = book.addFormat(book.addCustomNumFormat('0.000 "kg"')) | ||
var format3 = book.addFormat().setNumFormat(book.addCustomNumFormat('0.000 "kg"')); | ||
var format4 = book.addFormat() | ||
.setAlignH(xl.ALIGNH_JUSTIFY); | ||
foosheet.setCol(10, 10, 20, format4); | ||
foosheet.writeString(1, 10, 'This is a very long string which will not fit into the cell', format4); | ||
var format5 = book.addFormat() | ||
.setAlignH(xl.ALIGNH_RIGHT) | ||
.setPatternForegroundColor(xl.COLOR_GRAY25) | ||
.setFillPattern(xl.FILLPATTERN_SOLID); | ||
foosheet.setCol(5, 5, 10, format5); | ||
foosheet.setMerge(15, 16, 0, 10); | ||
foosheet.writeString(15, 0, 'Here we go: cell merging', format5); | ||
foosheet.writeString(1, 1, 'Hello world! فارسی'); | ||
foosheet.setCol(1, 1, 20, format3); | ||
foosheet.setRow(3, 30, format3); | ||
for (var i = 0; i < 10; i++) { | ||
foosheet.writeNum(i+2, 1, i, format1); | ||
foosheet.writeNum(i+2, 1, i, format3); | ||
foosheet.writeNum(i+2, 2, i*i, format2); | ||
} | ||
foosheet.setCol(1, 1, 20, format3); | ||
foosheet.setRow(3, 40, format3); | ||
@@ -29,0 +40,0 @@ var barsheet = book.addSheet('barsheet', foosheet); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
750808
28
120