version bump 0.16.8: CRLF in formulae
This commit is contained in:
parent
b9323c5502
commit
9f1ba60c8d
11
.gitattributes
vendored
11
.gitattributes
vendored
@ -4,8 +4,9 @@ test.js text eol=lf
|
||||
xlsx*.js text eol=lf
|
||||
*.flow.js text eol=lf
|
||||
|
||||
docbits/* linguist-documentation
|
||||
dist/* linguist-generated=true binary
|
||||
xlsx.js linguist-generated=true binary
|
||||
xlsxworker.js linguist-generated=true binary
|
||||
tests/core.js linguist-generated=true binary
|
||||
docbits/* linguist-documentation
|
||||
dist/* linguist-generated=true binary
|
||||
xlsx.js linguist-generated=true binary
|
||||
xlsxworker.js linguist-generated=true binary
|
||||
tests/core.js linguist-generated=true binary
|
||||
tests/fixtures.js linguist-generated=true binary
|
||||
|
@ -1 +1 @@
|
||||
XLSX.version = '0.16.7';
|
||||
XLSX.version = '0.16.8';
|
||||
|
@ -127,7 +127,7 @@ var sheetprot_deftrue = [
|
||||
"sort", "autoFilter", "pivotTables"
|
||||
];
|
||||
function write_ws_xml_protection(sp)/*:string*/ {
|
||||
// algorithmName, hashValue, saltValue, spinCountpassword
|
||||
// algorithmName, hashValue, saltValue, spinCount
|
||||
var o = ({sheet:1}/*:any*/);
|
||||
sheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = "1"; });
|
||||
sheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = "0"; });
|
||||
@ -303,6 +303,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
var sharedf = [];
|
||||
var dense = Array.isArray(s);
|
||||
var rows/*:Array<RowInfo>*/ = [], rowobj = {}, rowrite = false;
|
||||
var sheetStubs = !!opts.sheetStubs;
|
||||
for(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {
|
||||
x = marr[mt].trim();
|
||||
var xlen = x.length;
|
||||
@ -352,7 +353,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
if(opts.cellFormula) {
|
||||
if((cref=d.match(match_f))!= null && /*::cref != null && */cref[1] !== '') {
|
||||
/* TODO: match against XLSXFutureFunctions */
|
||||
p.f=unescapexml(utf8read(cref[1]));
|
||||
p.f=unescapexml(utf8read(cref[1])).replace(/\r\n/g, "\n");
|
||||
if(!opts.xlfn) p.f = _xlfn(p.f);
|
||||
if(/*::cref != null && cref[0] != null && */cref[0].indexOf('t="array"') > -1) {
|
||||
p.F = (d.match(refregex)||[])[1];
|
||||
@ -379,7 +380,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
if(tag.t == null && p.v === undefined) {
|
||||
if(p.f || p.F) {
|
||||
p.v = 0; p.t = "n";
|
||||
} else if(!opts.sheetStubs) continue;
|
||||
} else if(!sheetStubs) continue;
|
||||
else p.t = "z";
|
||||
}
|
||||
else p.t = tag.t || "n";
|
||||
@ -389,13 +390,13 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
switch(p.t) {
|
||||
case 'n':
|
||||
if(p.v == "" || p.v == null) {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else p.v = parseFloat(p.v);
|
||||
break;
|
||||
case 's':
|
||||
if(typeof p.v == 'undefined') {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else {
|
||||
sstr = strs[parseInt(p.v, 10)];
|
||||
|
14
dist/xlsx.core.min.js
generated
vendored
14
dist/xlsx.core.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/xlsx.core.min.map
generated
vendored
2
dist/xlsx.core.min.map
generated
vendored
File diff suppressed because one or more lines are too long
16
dist/xlsx.extendscript.js
generated
vendored
16
dist/xlsx.extendscript.js
generated
vendored
@ -9161,7 +9161,7 @@ module.exports = ZStream;
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.7';
|
||||
XLSX.version = '0.16.8';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -22487,7 +22487,7 @@ var sheetprot_deftrue = [
|
||||
"sort", "autoFilter", "pivotTables"
|
||||
];
|
||||
function write_ws_xml_protection(sp) {
|
||||
// algorithmName, hashValue, saltValue, spinCountpassword
|
||||
// algorithmName, hashValue, saltValue, spinCount
|
||||
var o = ({sheet:1});
|
||||
sheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = "1"; });
|
||||
sheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = "0"; });
|
||||
@ -22663,6 +22663,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
var sharedf = [];
|
||||
var dense = Array.isArray(s);
|
||||
var rows = [], rowobj = {}, rowrite = false;
|
||||
var sheetStubs = !!opts.sheetStubs;
|
||||
for(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {
|
||||
x = marr[mt].trim();
|
||||
var xlen = x.length;
|
||||
@ -22712,7 +22713,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
if(opts.cellFormula) {
|
||||
if((cref=d.match(match_f))!= null && cref[1] !== '') {
|
||||
/* TODO: match against XLSXFutureFunctions */
|
||||
p.f=unescapexml(utf8read(cref[1]));
|
||||
p.f=unescapexml(utf8read(cref[1])).replace(/\r\n/g, "\n");
|
||||
if(!opts.xlfn) p.f = _xlfn(p.f);
|
||||
if(cref[0].indexOf('t="array"') > -1) {
|
||||
p.F = (d.match(refregex)||[])[1];
|
||||
@ -22739,7 +22740,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
if(tag.t == null && p.v === undefined) {
|
||||
if(p.f || p.F) {
|
||||
p.v = 0; p.t = "n";
|
||||
} else if(!opts.sheetStubs) continue;
|
||||
} else if(!sheetStubs) continue;
|
||||
else p.t = "z";
|
||||
}
|
||||
else p.t = tag.t || "n";
|
||||
@ -22749,13 +22750,13 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
switch(p.t) {
|
||||
case 'n':
|
||||
if(p.v == "" || p.v == null) {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else p.v = parseFloat(p.v);
|
||||
break;
|
||||
case 's':
|
||||
if(typeof p.v == 'undefined') {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else {
|
||||
sstr = strs[parseInt(p.v, 10)];
|
||||
@ -28479,7 +28480,7 @@ function write_ws_biff8(idx, opts, wb) {
|
||||
}
|
||||
var cname = _sheet.CodeName || _sheet.name || s;
|
||||
/* ... */
|
||||
if(b8 && _WB.Views) write_biff_rec(ba, "Window2", write_Window2(_WB.Views[0]));
|
||||
if(b8) write_biff_rec(ba, "Window2", write_Window2((_WB.Views||[])[0]));
|
||||
/* ... */
|
||||
if(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, "MergeCells", write_MergeCells(ws['!merges']));
|
||||
/* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */
|
||||
@ -28899,6 +28900,7 @@ var parse_content_xml = (function() {
|
||||
case 'table': case '工作表': // 9.1.2 <table:table>
|
||||
if(Rn[1]==='/') {
|
||||
if(range.e.c >= range.s.c && range.e.r >= range.s.r) ws['!ref'] = encode_range(range);
|
||||
else ws['!ref'] = "A1:A1";
|
||||
if(opts.sheetRows > 0 && opts.sheetRows <= range.e.r) {
|
||||
ws['!fullref'] = ws['!ref'];
|
||||
range.e.r = opts.sheetRows - 1;
|
||||
|
8
dist/xlsx.full.min.js
generated
vendored
8
dist/xlsx.full.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/xlsx.full.min.map
generated
vendored
2
dist/xlsx.full.min.map
generated
vendored
File diff suppressed because one or more lines are too long
16
dist/xlsx.js
generated
vendored
16
dist/xlsx.js
generated
vendored
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.7';
|
||||
XLSX.version = '0.16.8';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -13330,7 +13330,7 @@ var sheetprot_deftrue = [
|
||||
"sort", "autoFilter", "pivotTables"
|
||||
];
|
||||
function write_ws_xml_protection(sp) {
|
||||
// algorithmName, hashValue, saltValue, spinCountpassword
|
||||
// algorithmName, hashValue, saltValue, spinCount
|
||||
var o = ({sheet:1});
|
||||
sheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = "1"; });
|
||||
sheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = "0"; });
|
||||
@ -13506,6 +13506,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
var sharedf = [];
|
||||
var dense = Array.isArray(s);
|
||||
var rows = [], rowobj = {}, rowrite = false;
|
||||
var sheetStubs = !!opts.sheetStubs;
|
||||
for(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {
|
||||
x = marr[mt].trim();
|
||||
var xlen = x.length;
|
||||
@ -13555,7 +13556,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
if(opts.cellFormula) {
|
||||
if((cref=d.match(match_f))!= null && cref[1] !== '') {
|
||||
/* TODO: match against XLSXFutureFunctions */
|
||||
p.f=unescapexml(utf8read(cref[1]));
|
||||
p.f=unescapexml(utf8read(cref[1])).replace(/\r\n/g, "\n");
|
||||
if(!opts.xlfn) p.f = _xlfn(p.f);
|
||||
if(cref[0].indexOf('t="array"') > -1) {
|
||||
p.F = (d.match(refregex)||[])[1];
|
||||
@ -13582,7 +13583,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
if(tag.t == null && p.v === undefined) {
|
||||
if(p.f || p.F) {
|
||||
p.v = 0; p.t = "n";
|
||||
} else if(!opts.sheetStubs) continue;
|
||||
} else if(!sheetStubs) continue;
|
||||
else p.t = "z";
|
||||
}
|
||||
else p.t = tag.t || "n";
|
||||
@ -13592,13 +13593,13 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
switch(p.t) {
|
||||
case 'n':
|
||||
if(p.v == "" || p.v == null) {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else p.v = parseFloat(p.v);
|
||||
break;
|
||||
case 's':
|
||||
if(typeof p.v == 'undefined') {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else {
|
||||
sstr = strs[parseInt(p.v, 10)];
|
||||
@ -19322,7 +19323,7 @@ function write_ws_biff8(idx, opts, wb) {
|
||||
}
|
||||
var cname = _sheet.CodeName || _sheet.name || s;
|
||||
/* ... */
|
||||
if(b8 && _WB.Views) write_biff_rec(ba, "Window2", write_Window2(_WB.Views[0]));
|
||||
if(b8) write_biff_rec(ba, "Window2", write_Window2((_WB.Views||[])[0]));
|
||||
/* ... */
|
||||
if(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, "MergeCells", write_MergeCells(ws['!merges']));
|
||||
/* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */
|
||||
@ -19742,6 +19743,7 @@ var parse_content_xml = (function() {
|
||||
case 'table': case '工作表': // 9.1.2 <table:table>
|
||||
if(Rn[1]==='/') {
|
||||
if(range.e.c >= range.s.c && range.e.r >= range.s.r) ws['!ref'] = encode_range(range);
|
||||
else ws['!ref'] = "A1:A1";
|
||||
if(opts.sheetRows > 0 && opts.sheetRows <= range.e.r) {
|
||||
ws['!fullref'] = ws['!ref'];
|
||||
range.e.r = opts.sheetRows - 1;
|
||||
|
12
dist/xlsx.min.js
generated
vendored
12
dist/xlsx.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/xlsx.min.map
generated
vendored
2
dist/xlsx.min.map
generated
vendored
File diff suppressed because one or more lines are too long
14
dist/xlsx.mini.min.js
generated
vendored
14
dist/xlsx.mini.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/xlsx.mini.min.map
generated
vendored
2
dist/xlsx.mini.min.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xlsx",
|
||||
"version": "0.16.7",
|
||||
"version": "0.16.8",
|
||||
"author": "sheetjs",
|
||||
"description": "SheetJS Spreadsheet data parser and writer",
|
||||
"keywords": [
|
||||
|
16
xlsx.flow.js
16
xlsx.flow.js
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.7';
|
||||
XLSX.version = '0.16.8';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*:: declare var cptable:any; */
|
||||
/*global cptable:true, window */
|
||||
@ -13432,7 +13432,7 @@ var sheetprot_deftrue = [
|
||||
"sort", "autoFilter", "pivotTables"
|
||||
];
|
||||
function write_ws_xml_protection(sp)/*:string*/ {
|
||||
// algorithmName, hashValue, saltValue, spinCountpassword
|
||||
// algorithmName, hashValue, saltValue, spinCount
|
||||
var o = ({sheet:1}/*:any*/);
|
||||
sheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = "1"; });
|
||||
sheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = "0"; });
|
||||
@ -13608,6 +13608,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
var sharedf = [];
|
||||
var dense = Array.isArray(s);
|
||||
var rows/*:Array<RowInfo>*/ = [], rowobj = {}, rowrite = false;
|
||||
var sheetStubs = !!opts.sheetStubs;
|
||||
for(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {
|
||||
x = marr[mt].trim();
|
||||
var xlen = x.length;
|
||||
@ -13657,7 +13658,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
if(opts.cellFormula) {
|
||||
if((cref=d.match(match_f))!= null && /*::cref != null && */cref[1] !== '') {
|
||||
/* TODO: match against XLSXFutureFunctions */
|
||||
p.f=unescapexml(utf8read(cref[1]));
|
||||
p.f=unescapexml(utf8read(cref[1])).replace(/\r\n/g, "\n");
|
||||
if(!opts.xlfn) p.f = _xlfn(p.f);
|
||||
if(/*::cref != null && cref[0] != null && */cref[0].indexOf('t="array"') > -1) {
|
||||
p.F = (d.match(refregex)||[])[1];
|
||||
@ -13684,7 +13685,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
if(tag.t == null && p.v === undefined) {
|
||||
if(p.f || p.F) {
|
||||
p.v = 0; p.t = "n";
|
||||
} else if(!opts.sheetStubs) continue;
|
||||
} else if(!sheetStubs) continue;
|
||||
else p.t = "z";
|
||||
}
|
||||
else p.t = tag.t || "n";
|
||||
@ -13694,13 +13695,13 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
switch(p.t) {
|
||||
case 'n':
|
||||
if(p.v == "" || p.v == null) {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else p.v = parseFloat(p.v);
|
||||
break;
|
||||
case 's':
|
||||
if(typeof p.v == 'undefined') {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else {
|
||||
sstr = strs[parseInt(p.v, 10)];
|
||||
@ -19440,7 +19441,7 @@ function write_ws_biff8(idx/*:number*/, opts, wb/*:Workbook*/) {
|
||||
}
|
||||
var cname/*:string*/ = _sheet.CodeName || _sheet.name || s;
|
||||
/* ... */
|
||||
if(b8 && _WB.Views) write_biff_rec(ba, "Window2", write_Window2(_WB.Views[0]));
|
||||
if(b8) write_biff_rec(ba, "Window2", write_Window2((_WB.Views||[])[0]));
|
||||
/* ... */
|
||||
if(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, "MergeCells", write_MergeCells(ws['!merges']));
|
||||
/* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */
|
||||
@ -19860,6 +19861,7 @@ var parse_content_xml = (function() {
|
||||
case 'table': case '工作表': // 9.1.2 <table:table>
|
||||
if(Rn[1]==='/') {
|
||||
if(range.e.c >= range.s.c && range.e.r >= range.s.r) ws['!ref'] = encode_range(range);
|
||||
else ws['!ref'] = "A1:A1";
|
||||
if(opts.sheetRows > 0 && opts.sheetRows <= range.e.r) {
|
||||
ws['!fullref'] = ws['!ref'];
|
||||
range.e.r = opts.sheetRows - 1;
|
||||
|
16
xlsx.js
generated
16
xlsx.js
generated
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.7';
|
||||
XLSX.version = '0.16.8';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -13330,7 +13330,7 @@ var sheetprot_deftrue = [
|
||||
"sort", "autoFilter", "pivotTables"
|
||||
];
|
||||
function write_ws_xml_protection(sp) {
|
||||
// algorithmName, hashValue, saltValue, spinCountpassword
|
||||
// algorithmName, hashValue, saltValue, spinCount
|
||||
var o = ({sheet:1});
|
||||
sheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = "1"; });
|
||||
sheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = "0"; });
|
||||
@ -13506,6 +13506,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
var sharedf = [];
|
||||
var dense = Array.isArray(s);
|
||||
var rows = [], rowobj = {}, rowrite = false;
|
||||
var sheetStubs = !!opts.sheetStubs;
|
||||
for(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {
|
||||
x = marr[mt].trim();
|
||||
var xlen = x.length;
|
||||
@ -13555,7 +13556,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
if(opts.cellFormula) {
|
||||
if((cref=d.match(match_f))!= null && cref[1] !== '') {
|
||||
/* TODO: match against XLSXFutureFunctions */
|
||||
p.f=unescapexml(utf8read(cref[1]));
|
||||
p.f=unescapexml(utf8read(cref[1])).replace(/\r\n/g, "\n");
|
||||
if(!opts.xlfn) p.f = _xlfn(p.f);
|
||||
if(cref[0].indexOf('t="array"') > -1) {
|
||||
p.F = (d.match(refregex)||[])[1];
|
||||
@ -13582,7 +13583,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
if(tag.t == null && p.v === undefined) {
|
||||
if(p.f || p.F) {
|
||||
p.v = 0; p.t = "n";
|
||||
} else if(!opts.sheetStubs) continue;
|
||||
} else if(!sheetStubs) continue;
|
||||
else p.t = "z";
|
||||
}
|
||||
else p.t = tag.t || "n";
|
||||
@ -13592,13 +13593,13 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
switch(p.t) {
|
||||
case 'n':
|
||||
if(p.v == "" || p.v == null) {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else p.v = parseFloat(p.v);
|
||||
break;
|
||||
case 's':
|
||||
if(typeof p.v == 'undefined') {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else {
|
||||
sstr = strs[parseInt(p.v, 10)];
|
||||
@ -19322,7 +19323,7 @@ function write_ws_biff8(idx, opts, wb) {
|
||||
}
|
||||
var cname = _sheet.CodeName || _sheet.name || s;
|
||||
/* ... */
|
||||
if(b8 && _WB.Views) write_biff_rec(ba, "Window2", write_Window2(_WB.Views[0]));
|
||||
if(b8) write_biff_rec(ba, "Window2", write_Window2((_WB.Views||[])[0]));
|
||||
/* ... */
|
||||
if(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, "MergeCells", write_MergeCells(ws['!merges']));
|
||||
/* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */
|
||||
@ -19742,6 +19743,7 @@ var parse_content_xml = (function() {
|
||||
case 'table': case '工作表': // 9.1.2 <table:table>
|
||||
if(Rn[1]==='/') {
|
||||
if(range.e.c >= range.s.c && range.e.r >= range.s.r) ws['!ref'] = encode_range(range);
|
||||
else ws['!ref'] = "A1:A1";
|
||||
if(opts.sheetRows > 0 && opts.sheetRows <= range.e.r) {
|
||||
ws['!fullref'] = ws['!ref'];
|
||||
range.e.r = opts.sheetRows - 1;
|
||||
|
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.7';
|
||||
XLSX.version = '0.16.8';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
|
||||
var VALID_ANSI = [ 874, 932, 936, 949, 950 ];
|
||||
@ -7353,7 +7353,7 @@ var sheetprot_deftrue = [
|
||||
"sort", "autoFilter", "pivotTables"
|
||||
];
|
||||
function write_ws_xml_protection(sp)/*:string*/ {
|
||||
// algorithmName, hashValue, saltValue, spinCountpassword
|
||||
// algorithmName, hashValue, saltValue, spinCount
|
||||
var o = ({sheet:1}/*:any*/);
|
||||
sheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = "1"; });
|
||||
sheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = "0"; });
|
||||
@ -7529,6 +7529,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
var sharedf = [];
|
||||
var dense = Array.isArray(s);
|
||||
var rows/*:Array<RowInfo>*/ = [], rowobj = {}, rowrite = false;
|
||||
var sheetStubs = !!opts.sheetStubs;
|
||||
for(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {
|
||||
x = marr[mt].trim();
|
||||
var xlen = x.length;
|
||||
@ -7578,7 +7579,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
if(opts.cellFormula) {
|
||||
if((cref=d.match(match_f))!= null && /*::cref != null && */cref[1] !== '') {
|
||||
/* TODO: match against XLSXFutureFunctions */
|
||||
p.f=unescapexml(utf8read(cref[1]));
|
||||
p.f=unescapexml(utf8read(cref[1])).replace(/\r\n/g, "\n");
|
||||
if(!opts.xlfn) p.f = _xlfn(p.f);
|
||||
if(/*::cref != null && cref[0] != null && */cref[0].indexOf('t="array"') > -1) {
|
||||
p.F = (d.match(refregex)||[])[1];
|
||||
@ -7605,7 +7606,7 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
if(tag.t == null && p.v === undefined) {
|
||||
if(p.f || p.F) {
|
||||
p.v = 0; p.t = "n";
|
||||
} else if(!opts.sheetStubs) continue;
|
||||
} else if(!sheetStubs) continue;
|
||||
else p.t = "z";
|
||||
}
|
||||
else p.t = tag.t || "n";
|
||||
@ -7615,13 +7616,13 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th
|
||||
switch(p.t) {
|
||||
case 'n':
|
||||
if(p.v == "" || p.v == null) {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else p.v = parseFloat(p.v);
|
||||
break;
|
||||
case 's':
|
||||
if(typeof p.v == 'undefined') {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else {
|
||||
sstr = strs[parseInt(p.v, 10)];
|
||||
|
13
xlsx.mini.js
13
xlsx.mini.js
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.7';
|
||||
XLSX.version = '0.16.8';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
|
||||
var VALID_ANSI = [ 874, 932, 936, 949, 950 ];
|
||||
@ -7262,7 +7262,7 @@ var sheetprot_deftrue = [
|
||||
"sort", "autoFilter", "pivotTables"
|
||||
];
|
||||
function write_ws_xml_protection(sp) {
|
||||
// algorithmName, hashValue, saltValue, spinCountpassword
|
||||
// algorithmName, hashValue, saltValue, spinCount
|
||||
var o = ({sheet:1});
|
||||
sheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = "1"; });
|
||||
sheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = "0"; });
|
||||
@ -7438,6 +7438,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
var sharedf = [];
|
||||
var dense = Array.isArray(s);
|
||||
var rows = [], rowobj = {}, rowrite = false;
|
||||
var sheetStubs = !!opts.sheetStubs;
|
||||
for(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {
|
||||
x = marr[mt].trim();
|
||||
var xlen = x.length;
|
||||
@ -7487,7 +7488,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
if(opts.cellFormula) {
|
||||
if((cref=d.match(match_f))!= null && cref[1] !== '') {
|
||||
/* TODO: match against XLSXFutureFunctions */
|
||||
p.f=unescapexml(utf8read(cref[1]));
|
||||
p.f=unescapexml(utf8read(cref[1])).replace(/\r\n/g, "\n");
|
||||
if(!opts.xlfn) p.f = _xlfn(p.f);
|
||||
if(cref[0].indexOf('t="array"') > -1) {
|
||||
p.F = (d.match(refregex)||[])[1];
|
||||
@ -7514,7 +7515,7 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
if(tag.t == null && p.v === undefined) {
|
||||
if(p.f || p.F) {
|
||||
p.v = 0; p.t = "n";
|
||||
} else if(!opts.sheetStubs) continue;
|
||||
} else if(!sheetStubs) continue;
|
||||
else p.t = "z";
|
||||
}
|
||||
else p.t = tag.t || "n";
|
||||
@ -7524,13 +7525,13 @@ return function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {
|
||||
switch(p.t) {
|
||||
case 'n':
|
||||
if(p.v == "" || p.v == null) {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else p.v = parseFloat(p.v);
|
||||
break;
|
||||
case 's':
|
||||
if(typeof p.v == 'undefined') {
|
||||
if(!opts.sheetStubs) continue;
|
||||
if(!sheetStubs) continue;
|
||||
p.t = 'z';
|
||||
} else {
|
||||
sstr = strs[parseInt(p.v, 10)];
|
||||
|
Loading…
Reference in New Issue
Block a user