Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-79-npm / node-xlsx / node-xlsx.js
526 bytesRaw
1 | ; |
2 | |
3 | var path = require('path'); |
4 | var xlsx = require('node-xlsx'); |
5 | |
6 | var xls = xlsx.parse(path.join(__dirname, 'registry.xls')); |
7 | var ods = xlsx.parse(path.join(__dirname, 'ffc.ods')); |
8 | |
9 | var data = [ |
10 | [ 1, 2, 3 ], |
11 | [ true, false, null, 'sheetjs' ], |
12 | [ 'foo', 'bar', new Date('2014-02-19T14:30Z'), '0.3' ], |
13 | [ 'baz', null, 'qux' ] |
14 | ]; |
15 | |
16 | var buffer = xlsx.build([ { name: 'SheetName', data: data } ]); |
17 | |
18 | if ((xls[0].data.length > 50) && |
19 | (ods[0].data.length > 30) && |
20 | (buffer.length > 10)) { |
21 | console.log('ok'); |
22 | } |
23 |
Built with git-ssb-web