sheetjs/demos/altjs/skookum.js
SheetJS ad47cb433c Math.LOG2E precision issue + new demos [ci skip]
- swift + jsc
- java + rhino
- XMLHttpRequest and friends
2017-09-05 01:34:30 -04:00

14 lines
428 B
JavaScript

#!/usr/bin/env sjs
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
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]]);