forked from sheetjs/sheetjs
Fixed xml parsing of '0' in date1904
This commit is contained in:
parent
a0b73e3d4f
commit
8fc0f91395
@ -440,7 +440,11 @@ function parseWB(data) {
|
|||||||
wb.WBView.forEach(function(w){for(var z in WBViewDef) if(null==w[z]) w[z]=WBViewDef[z]; });
|
wb.WBView.forEach(function(w){for(var z in WBViewDef) if(null==w[z]) w[z]=WBViewDef[z]; });
|
||||||
wb.Sheets.forEach(function(w){for(var z in SheetDef) if(null==w[z]) w[z]=SheetDef[z]; });
|
wb.Sheets.forEach(function(w){for(var z in SheetDef) if(null==w[z]) w[z]=SheetDef[z]; });
|
||||||
|
|
||||||
_ssfopts.date1904 = wb.WBProps.date1904;
|
switch(wb.WBProps.date1904) {
|
||||||
|
case '0': case 0: case 'false': case 'FALSE': _ssfopts.date1904=false;break;
|
||||||
|
case '1': case 1: case 'true': case 'TRUE': _ssfopts.date1904 = true; break;
|
||||||
|
default: throw "unrecognized date1904: " + wb.WBProps.date1904;
|
||||||
|
}
|
||||||
|
|
||||||
return wb;
|
return wb;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xlsx",
|
"name": "xlsx",
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"author": "Niggler",
|
"author": "Niggler",
|
||||||
"description": "(one day) a full-featured XLSX parser and writer. For now, primitive parser",
|
"description": "(one day) a full-featured XLSX parser and writer. For now, primitive parser",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
6
xlsx.js
6
xlsx.js
@ -664,7 +664,11 @@ function parseWB(data) {
|
|||||||
wb.WBView.forEach(function(w){for(var z in WBViewDef) if(null==w[z]) w[z]=WBViewDef[z]; });
|
wb.WBView.forEach(function(w){for(var z in WBViewDef) if(null==w[z]) w[z]=WBViewDef[z]; });
|
||||||
wb.Sheets.forEach(function(w){for(var z in SheetDef) if(null==w[z]) w[z]=SheetDef[z]; });
|
wb.Sheets.forEach(function(w){for(var z in SheetDef) if(null==w[z]) w[z]=SheetDef[z]; });
|
||||||
|
|
||||||
_ssfopts.date1904 = wb.WBProps.date1904;
|
switch(wb.WBProps.date1904) {
|
||||||
|
case '0': case 0: case 'false': case 'FALSE': _ssfopts.date1904=false;break;
|
||||||
|
case '1': case 1: case 'true': case 'TRUE': _ssfopts.date1904 = true; break;
|
||||||
|
default: throw "unrecognized date1904: " + wb.WBProps.date1904;
|
||||||
|
}
|
||||||
|
|
||||||
return wb;
|
return wb;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user