forked from sheetjs/sheetjs
version bump 0.12.10: sheet_to_json niggle
- default not treated as value for empty rows (fixes #1078 h/t @cemremengu)
This commit is contained in:
parent
6916d5fc73
commit
f032f34c6e
@ -1 +1 @@
|
||||
XLSX.version = '0.12.9';
|
||||
XLSX.version = '0.12.10';
|
||||
|
@ -51,7 +51,7 @@ function sheet_to_json(sheet/*:Worksheet*/, opts/*:?Sheet2JSONOpts*/) {
|
||||
val = dense ? sheet[R][C] : sheet[cols[C] + rr];
|
||||
if(val === undefined || val.t === undefined) {
|
||||
if(defval === undefined) continue;
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; isempty = false; }
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; }
|
||||
continue;
|
||||
}
|
||||
v = val.v;
|
||||
@ -69,7 +69,7 @@ function sheet_to_json(sheet/*:Worksheet*/, opts/*:?Sheet2JSONOpts*/) {
|
||||
} else {
|
||||
row[hdr[C]] = raw ? v : format_cell(val,v,o);
|
||||
}
|
||||
isempty = false;
|
||||
if(v != null) isempty = false;
|
||||
}
|
||||
}
|
||||
if((isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row;
|
||||
|
6
dist/xlsx.core.min.js
generated
vendored
6
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
8
dist/xlsx.extendscript.js
generated
vendored
8
dist/xlsx.extendscript.js
generated
vendored
@ -9147,7 +9147,7 @@ module.exports = ZStream;
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
(function make_xlsx(XLSX){
|
||||
XLSX.version = '0.12.9';
|
||||
XLSX.version = '0.12.10';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -16200,7 +16200,7 @@ var parse_rs = (function parse_rs_factory() {
|
||||
|
||||
if(font.u) style.push("text-decoration: underline;");
|
||||
if(font.uval) style.push("text-underline-style:" + font.uval + ";");
|
||||
if(font.sz) style.push("font-size:" + font.sz + ";");
|
||||
if(font.sz) style.push("font-size:" + font.sz + "pt;");
|
||||
if(font.outline) style.push("text-effect: outline;");
|
||||
if(font.shadow) style.push("text-shadow: auto;");
|
||||
intro.push('<span style="' + style.join("") + '">');
|
||||
@ -28610,7 +28610,7 @@ function sheet_to_json(sheet, opts) {
|
||||
val = dense ? sheet[R][C] : sheet[cols[C] + rr];
|
||||
if(val === undefined || val.t === undefined) {
|
||||
if(defval === undefined) continue;
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; isempty = false; }
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; }
|
||||
continue;
|
||||
}
|
||||
v = val.v;
|
||||
@ -28628,7 +28628,7 @@ function sheet_to_json(sheet, opts) {
|
||||
} else {
|
||||
row[hdr[C]] = raw ? v : format_cell(val,v,o);
|
||||
}
|
||||
isempty = false;
|
||||
if(v != null) isempty = false;
|
||||
}
|
||||
}
|
||||
if((isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row;
|
||||
|
6
dist/xlsx.full.min.js
generated
vendored
6
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
8
dist/xlsx.js
generated
vendored
8
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(XLSX){
|
||||
XLSX.version = '0.12.9';
|
||||
XLSX.version = '0.12.10';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -7057,7 +7057,7 @@ var parse_rs = (function parse_rs_factory() {
|
||||
|
||||
if(font.u) style.push("text-decoration: underline;");
|
||||
if(font.uval) style.push("text-underline-style:" + font.uval + ";");
|
||||
if(font.sz) style.push("font-size:" + font.sz + ";");
|
||||
if(font.sz) style.push("font-size:" + font.sz + "pt;");
|
||||
if(font.outline) style.push("text-effect: outline;");
|
||||
if(font.shadow) style.push("text-shadow: auto;");
|
||||
intro.push('<span style="' + style.join("") + '">');
|
||||
@ -19467,7 +19467,7 @@ function sheet_to_json(sheet, opts) {
|
||||
val = dense ? sheet[R][C] : sheet[cols[C] + rr];
|
||||
if(val === undefined || val.t === undefined) {
|
||||
if(defval === undefined) continue;
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; isempty = false; }
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; }
|
||||
continue;
|
||||
}
|
||||
v = val.v;
|
||||
@ -19485,7 +19485,7 @@ function sheet_to_json(sheet, opts) {
|
||||
} else {
|
||||
row[hdr[C]] = raw ? v : format_cell(val,v,o);
|
||||
}
|
||||
isempty = false;
|
||||
if(v != null) isempty = false;
|
||||
}
|
||||
}
|
||||
if((isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row;
|
||||
|
26
dist/xlsx.min.js
generated
vendored
26
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
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xlsx",
|
||||
"version": "0.12.9",
|
||||
"version": "0.12.10",
|
||||
"author": "sheetjs",
|
||||
"description": "SheetJS Spreadsheet data parser and writer",
|
||||
"keywords": [
|
||||
|
2
test.js
2
test.js
@ -865,7 +865,7 @@ describe('parse features', function() {
|
||||
assert.equal(get_cell(ws, "B1").c[0].t, "Yegor Kozlov:\nfirst cell", "must have the concatenated texts");
|
||||
if(i > 0) return;
|
||||
assert.equal(get_cell(ws, "B1").c[0].r, '<r><rPr><b/><sz val="8"/><color indexed="81"/><rFont val="Tahoma"/></rPr><t>Yegor Kozlov:</t></r><r><rPr><sz val="8"/><color indexed="81"/><rFont val="Tahoma"/></rPr><t xml:space="preserve">\r\nfirst cell</t></r>', "must have the rich text representation");
|
||||
assert.equal(get_cell(ws, "B1").c[0].h, '<span style="font-size:8;"><b>Yegor Kozlov:</b></span><span style="font-size:8;"><br/>first cell</span>', "must have the html representation");
|
||||
assert.equal(get_cell(ws, "B1").c[0].h, '<span style="font-size:8pt;"><b>Yegor Kozlov:</b></span><span style="font-size:8pt;"><br/>first cell</span>', "must have the html representation");
|
||||
});
|
||||
});
|
||||
[
|
||||
|
2
tests/core.js
generated
2
tests/core.js
generated
@ -865,7 +865,7 @@ describe('parse features', function() {
|
||||
assert.equal(get_cell(ws, "B1").c[0].t, "Yegor Kozlov:\nfirst cell", "must have the concatenated texts");
|
||||
if(i > 0) return;
|
||||
assert.equal(get_cell(ws, "B1").c[0].r, '<r><rPr><b/><sz val="8"/><color indexed="81"/><rFont val="Tahoma"/></rPr><t>Yegor Kozlov:</t></r><r><rPr><sz val="8"/><color indexed="81"/><rFont val="Tahoma"/></rPr><t xml:space="preserve">\r\nfirst cell</t></r>', "must have the rich text representation");
|
||||
assert.equal(get_cell(ws, "B1").c[0].h, '<span style="font-size:8;"><b>Yegor Kozlov:</b></span><span style="font-size:8;"><br/>first cell</span>', "must have the html representation");
|
||||
assert.equal(get_cell(ws, "B1").c[0].h, '<span style="font-size:8pt;"><b>Yegor Kozlov:</b></span><span style="font-size:8pt;"><br/>first cell</span>', "must have the html representation");
|
||||
});
|
||||
});
|
||||
[
|
||||
|
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
(function make_xlsx(XLSX){
|
||||
XLSX.version = '0.12.9';
|
||||
XLSX.version = '0.12.10';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*:: declare var cptable:any; */
|
||||
/*global cptable:true */
|
||||
@ -19584,7 +19584,7 @@ function sheet_to_json(sheet/*:Worksheet*/, opts/*:?Sheet2JSONOpts*/) {
|
||||
val = dense ? sheet[R][C] : sheet[cols[C] + rr];
|
||||
if(val === undefined || val.t === undefined) {
|
||||
if(defval === undefined) continue;
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; isempty = false; }
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; }
|
||||
continue;
|
||||
}
|
||||
v = val.v;
|
||||
@ -19602,7 +19602,7 @@ function sheet_to_json(sheet/*:Worksheet*/, opts/*:?Sheet2JSONOpts*/) {
|
||||
} else {
|
||||
row[hdr[C]] = raw ? v : format_cell(val,v,o);
|
||||
}
|
||||
isempty = false;
|
||||
if(v != null) isempty = false;
|
||||
}
|
||||
}
|
||||
if((isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row;
|
||||
|
6
xlsx.js
generated
6
xlsx.js
generated
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
(function make_xlsx(XLSX){
|
||||
XLSX.version = '0.12.9';
|
||||
XLSX.version = '0.12.10';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -19467,7 +19467,7 @@ function sheet_to_json(sheet, opts) {
|
||||
val = dense ? sheet[R][C] : sheet[cols[C] + rr];
|
||||
if(val === undefined || val.t === undefined) {
|
||||
if(defval === undefined) continue;
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; isempty = false; }
|
||||
if(hdr[C] != null) { row[hdr[C]] = defval; }
|
||||
continue;
|
||||
}
|
||||
v = val.v;
|
||||
@ -19485,7 +19485,7 @@ function sheet_to_json(sheet, opts) {
|
||||
} else {
|
||||
row[hdr[C]] = raw ? v : format_cell(val,v,o);
|
||||
}
|
||||
isempty = false;
|
||||
if(v != null) isempty = false;
|
||||
}
|
||||
}
|
||||
if((isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row;
|
||||
|
Loading…
Reference in New Issue
Block a user