2017-08-10 23:46:34 +00:00
|
|
|
#!/usr/bin/env sjs
|
2017-09-05 05:26:50 +00:00
|
|
|
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
2017-08-10 23:46:34 +00:00
|
|
|
|
|
|
|
var XLSX = require('../../xlsx.js');
|
|
|
|
|
|
|
|
var io = require('io');
|
|
|
|
var file = io.open("sheetjs.xlsx", "rb");
|
|
|
|
var strs = [], str = "";
|
|
|
|
while((str = file.read()).length > 0) strs.push(str);
|
|
|
|
var data = (Buffer.concat(strs.map(function(x) { return new Buffer(x); })));
|
|
|
|
|
|
|
|
var wb = XLSX.read(data, {type:"buffer"});
|
|
|
|
console.log(wb.Sheets[wb.SheetNames[0]]);
|