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