diff --git a/tests/core.js b/tests/core.js index 16e0afa..ef4daf4 100644 --- a/tests/core.js +++ b/tests/core.js @@ -2094,6 +2094,7 @@ describe('HTML', function() { }); if(domtest) it('should honor sheetRows', function() { var html = X.utils.sheet_to_html(X.utils.aoa_to_sheet([[1,2],[3,4],[5,6]])); + // $FlowIgnore html = /
]*>([\s\S]*)<\/body>/i.exec(html)[1]; var ws = X.utils.table_to_sheet(get_dom_element(html)); assert.equal(ws['!ref'], "A1:B3"); diff --git a/xlsx.core.min.js b/xlsx.core.min.js index d5691c6..68e73a5 100644 --- a/xlsx.core.min.js +++ b/xlsx.core.min.js @@ -1,16 +1,16 @@ /*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */ var DO_NOT_EXPORT_CODEPAGE=true;var DO_NOT_EXPORT_JSZIP=true;(function(e){if("object"==typeof exports&&"undefined"!=typeof module&&"undefined"==typeof DO_NOT_EXPORT_JSZIP)module.exports=e();else if("function"==typeof define&&define.amd&&"undefined"==typeof DO_NOT_EXPORT_JSZIP){JSZipSync=e();define([],e)}else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof global?r=global:"undefined"!=typeof $&&$.global?r=$.global:"undefined"!=typeof self&&(r=self),r.JSZipSync=e()}})(function(){var e,r,t;return function a(e,r,t){function n(s,f){if(!r[s]){if(!e[s]){var l=typeof require=="function"&&require;if(!f&&l)return l(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}var o=r[s]={exports:{}};e[s][0].call(o.exports,function(r){var t=e[s][1][r];return n(t?t:r)},o,o.exports,a,e,r,t)}return r[s].exports}var i=typeof require=="function"&&require;for(var s=0;s0){if(e.strm.data_type===f){e.strm.data_type=oe(e)}ne(e,e.l_desc);ne(e,e.d_desc);l=fe(e);i=e.opt_len+3+7>>>3;s=e.static_len+3+7>>>3;if(s<=i){i=s}}else{i=s=t+5}if(t+4<=i&&r!==-1){he(e,r,t,a)}else if(e.strategy===n||s===i){G(e,(c<<1)+(a?1:0),3);ae(e,D,O)}else{G(e,(u<<1)+(a?1:0),3);le(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1);ae(e,e.dyn_ltree,e.dyn_dtree)}J(e);if(a){q(e)}}function pe(e,r,t){e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255;e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255;e.pending_buf[e.l_buf+e.last_lit]=t&255;e.last_lit++;if(r===0){e.dyn_ltree[t*2]++}else{e.matches++;r--;e.dyn_ltree[(P[t]+p+1)*2]++;e.dyn_dtree[z(r)*2]++}return e.last_lit===e.lit_bufsize-1}t._tr_init=ue;t._tr_stored_block=he;t._tr_flush_block=ve;t._tr_tally=pe;t._tr_align=de},{"../utils/common":27}],39:[function(e,r,t){"use strict";function a(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}r.exports=a},{}]},{},[9])(9)});var XLSX={};function make_xlsx_lib(e){e.version="0.13.3";var r=1200,t=1252;if(typeof module!=="undefined"&&typeof require!=="undefined"){if(typeof cptable==="undefined"){if(typeof global!=="undefined")global.cptable=undefined;else if(typeof window!=="undefined")window.cptable=undefined}}var a=[874,932,936,949,950];for(var n=0;n<=8;++n)a.push(1250+n);var i={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969};var s=function(e){if(a.indexOf(e)==-1)return;t=i[0]=e};function f(){s(1252)}var l=function(e){r=e;s(e)};function o(){l(1200);f()}function c(e){var r=[];for(var t=0,a=e.length;t>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return r.join("")}function h(e){var r=[];for(var t=0;t 0){if(e.strm.data_type===f){e.strm.data_type=oe(e)}ne(e,e.l_desc);ne(e,e.d_desc);l=fe(e);i=e.opt_len+3+7>>>3;s=e.static_len+3+7>>>3;if(s<=i){i=s}}else{i=s=t+5}if(t+4<=i&&r!==-1){he(e,r,t,a)}else if(e.strategy===n||s===i){G(e,(c<<1)+(a?1:0),3);ae(e,D,O)}else{G(e,(u<<1)+(a?1:0),3);le(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1);ae(e,e.dyn_ltree,e.dyn_dtree)}J(e);if(a){q(e)}}function pe(e,r,t){e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255;e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255;e.pending_buf[e.l_buf+e.last_lit]=t&255;e.last_lit++;if(r===0){e.dyn_ltree[t*2]++}else{e.matches++;r--;e.dyn_ltree[(P[t]+p+1)*2]++;e.dyn_dtree[z(r)*2]++}return e.last_lit===e.lit_bufsize-1}t._tr_init=ue;t._tr_stored_block=he;t._tr_flush_block=ve;t._tr_tally=pe;t._tr_align=de},{"../utils/common":27}],39:[function(e,r,t){"use strict";function a(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}r.exports=a},{}]},{},[9])(9)});var XLSX={};function make_xlsx_lib(e){e.version="0.13.4";var r=1200,t=1252;if(typeof module!=="undefined"&&typeof require!=="undefined"){if(typeof cptable==="undefined"){if(typeof global!=="undefined")global.cptable=undefined;else if(typeof window!=="undefined")window.cptable=undefined}}var a=[874,932,936,949,950];for(var n=0;n<=8;++n)a.push(1250+n);var i={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969};var s=function(e){if(a.indexOf(e)==-1)return;t=i[0]=e};function f(){s(1252)}var l=function(e){r=e;s(e)};function o(){l(1200);f()}function c(e){var r=[];for(var t=0,a=e.length;t>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return r.join("")}function h(e){var r=[];for(var t=0;t0&&u!==x)C[u].name="!MiniFAT";C[m[0]].name="!FAT";C.fat_addrs=m;C.ssz=a;var B={},T=[],y=[],I=[];p(s,C,_,T,n,B,y,u);c(y,I,T);T.shift();var A={FileIndex:y,FullPaths:I};if(r&&r.raw)A.raw={header:w,sectors:_};return A}function f(e){e.chk(R,"Header Signature: ");e.chk(O,"CLSID: ");var r=e._R(2,"u");return[e._R(2,"u"),r]}function l(e,r){var t=9;e.l+=2;switch(t=e._R(2)){case 9:if(r!=3)throw new Error("Sector Shift: Expected 9 saw "+t);break;case 12:if(r!=4)throw new Error("Sector Shift: Expected 12 saw "+t);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+t);}e.chk("0600","Mini Sector Shift: ");e.chk("000000000000","Reserved: ")}function o(e,r){var t=Math.ceil(e.length/r)-1;var a=[];for(var n=1;na.l){a=a.slice(0,a.l);a.l=a.length}if(a.length>0)e.push(a);a=null};var i=function c(e){if(a&&e":a.strike=1;break;case"":break;case"":;case"":a.u=1;break;case"":break;case"":;case"":a.b=1;break;case"":break;case"":;case"":a.i=1;break;case"":break;case"");t.push("")}if(s=="superscript")s="sup";else if(s=="subscript")s="sub";if(s!=""){r.push("<"+s+">");t.push(""+s+">")}t.push("");return n};function f(t){var a=[[],"",[]];var i=t.match(e);if(!i)return"";a[1]=i[1];var f=t.match(r);if(f)s(f[1],a[0],a[2]);return a[0].join("")+a[1].replace(n,"
")+a[2].join("")}return function o(e){return e.replace(t,"").split(a).map(f).join("")}}();var sf=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,ff=/<(?:\w+:)?r>/;var lf=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function of(e,r){var t=r?r.cellHTML:true;var a={};if(!e)return null;if(e.match(/^\s*<(?:\w+:)?t[^>]*>/)){a.t=Ae(We(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||""));a.r=We(e);if(t)a.h=Ne(a.t)}else if(e.match(ff)){a.r=We(e);a.t=Ae(We((e.replace(lf,"").match(sf)||[]).join("").replace(_e,"")));if(t)a.h=nf(a.r)}return a}var cf=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/;var uf=/<(?:\w+:)?(?:si|sstItem)>/g;var hf=/<\/(?:\w+:)?(?:si|sstItem)>/;function df(e,r){var t=[],a="";if(!e)return t;var n=e.match(cf);if(n){a=n[2].replace(uf,"").split(hf);for(var i=0;i!=a.length;++i){var s=of(a[i].trim(),r);if(s!=null)t[t.length]=s}n=Te(n[1]);t.Count=n.count;t.Unique=n.uniqueCount}return t}Ia.SST="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings";var vf=/^\s|\s$|[\t\n\r]/;function pf(e,r){if(!r.bookSST)return"";var t=[ke];t[t.length]=rr("sst",null,{xmlns:nr.main[0],count:e.Count,uniqueCount:e.Unique});for(var a=0;a!=e.length;++a){if(e[a]==null)continue;var n=e[a];var i="":n.strike=1;break;case"