sheetjs_sheetjs/demos/browserify/xlsxworker.js
SheetJS 3d1f0f79ca version bump 0.8.7: bundlers
demos for browserify/requirejs/webpack
2017-03-04 20:14:08 -05:00

13 lines
381 B
JavaScript

/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
importScripts('browserify.min.js');
var XLSX = require('xlsx');
postMessage({t:"ready"});
onmessage = function (oEvent) {
var v;
try {
v = XLSX.read(oEvent.data.d, {type: oEvent.data.b ? 'binary' : 'base64'});
} catch(e) { postMessage({t:"e",d:e.stack||e}); }
postMessage({t:"xlsx", d:JSON.stringify(v)});
};