UNPKG

450 BJavaScriptView Raw
1/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
2importScripts('shim.js');
3/* uncomment the next line for encoding support */
4importScripts('dist/cpexcel.js');
5importScripts('jszip.js');
6importScripts('xlsx.js');
7postMessage({t:"ready"});
8
9onmessage = function (evt) {
10 var v;
11 try {
12 v = XLSX.read(evt.data.d, {type: evt.data.b});
13postMessage({t:"xlsx", d:JSON.stringify(v)});
14 } catch(e) { postMessage({t:"e",d:e.stack||e}); }
15};