xlsxworker.js 532 B

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