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