sheetjs/bits/88_read.js
SheetJS 32d835ab81 version bump 0.4.0: very basic XLSB support
subfiles reshuffled (XLSB and XLSX/XLSM content separated)
2014-01-28 11:38:02 -05:00

21 lines
529 B
JavaScript

function readSync(data, options) {
var zip, d = data;
var o = options||{};
switch((o.type||"base64")){
case "file": d = _fs.readFileSync(data).toString('base64');
/* falls through */
case "base64": zip = new jszip(d, { base64:true }); break;
case "binary": zip = new jszip(d, { base64:false }); break;
}
return parseZip(zip);
}
function readFileSync(data, options) {
var o = options||{}; o.type = 'file';
return readSync(data, o);
}
XLSX.read = readSync;
XLSX.readFile = readFileSync;
XLSX.parseZip = parseZip;