changed empty cell replacement to optional

This commit is contained in:
John Bryan 2015-04-21 16:11:30 -04:00
parent 877ce1928d
commit 7b7e954c1f

3
dist/xlsx.js vendored
View File

@ -11507,6 +11507,7 @@ function sheet_to_json(sheet, opts){
var val, row, range, header = 0, offset = 1, r, hdr = [], isempty, R, C, v;
var o = opts != null ? opts : {};
var raw = o.raw;
var emptyString = o.emptyString;
/* empty string value */
var emptyVal = {t: 's', v: '', r: '<t></t>', h: '', w: ''};
@ -11549,7 +11550,7 @@ function sheet_to_json(sheet, opts){
}
for (C = r.s.c; C <= r.e.c; ++C) {
/* replace cell with empty string if undefined */
val = sheet[cols[C] + rr] || emptyVal;
val = emptyString ? sheet[cols[C] + rr] || emptyVal : sheet[cols[C] + rr];
if(val === undefined || val.t === undefined) continue;
v = val.v;
switch(val.t){