xlsxworker.js 450 B

123456789101112131415
  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. 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. };