From 0985caf352ed1006245a9dee23e194ae7a103162 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Wed, 14 Oct 2015 23:24:34 +0100 Subject: [PATCH] Fix for problem with xlsx files overriding the reserved number format codes below 164 with custom codes --- src/PhpSpreadsheet/Reader/Excel2007.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Reader/Excel2007.php b/src/PhpSpreadsheet/Reader/Excel2007.php index c3e2737c..27b3c9bb 100644 --- a/src/PhpSpreadsheet/Reader/Excel2007.php +++ b/src/PhpSpreadsheet/Reader/Excel2007.php @@ -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 // So we make allowance for them rather than lose formatting masks 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"]); } }