Fix for problem with xlsx files overriding the reserved number format codes below 164 with custom codes

This commit is contained in:
MarkBaker 2015-10-14 23:24:34 +01:00
parent 450e1672f0
commit 0985caf352
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ class Excel2007 extends BaseReader implements IReader
// But there's a lot of naughty homebrew xlsx writers that do use "reserved" id values that aren't actually used // But there's a lot of naughty homebrew xlsx writers that do use "reserved" id values that aren't actually used
// So we make allowance for them rather than lose formatting masks // So we make allowance for them rather than lose formatting masks
if ((int)$xf["numFmtId"] < 164 && if ((int)$xf["numFmtId"] < 164 &&
\PHPExcel\Style\NumberFormat::builtInFormatCodeIndex((int)$xf["numFmtId"]) !== false) { \PHPExcel\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]) !== '') {
$numFmt = \PHPExcel\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]); $numFmt = \PHPExcel\Style\NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
} }
} }