UNPKG

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