forked from sheetjs/sheetjs
SheetJS
5b67ac0806
- dollar currencies and percentages properly detected as numbers - parse potential CDATA segments in XLSX (fixes #775 h/t @awb99) - IE8 issues with regex - altjs demos Issues: - fixes #673 h/t @huhm - fixes #748 h/t @sangpuion - fixes #749 h/t @GreggOD - fixes #772 h/t @sangpuion @jyyan
13 lines
366 B
JavaScript
13 lines
366 B
JavaScript
#!/usr/bin/env sjs
|
|
|
|
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]]);
|