Fixed numeric check bug for XLSX

This commit is contained in:
Chris Graham 2015-03-22 19:20:53 +00:00
parent d2029a084f
commit 3dd4c4ecce

View File

@ -139,7 +139,7 @@ EOD;
if (empty($cellValue)) { if (empty($cellValue)) {
$data .= '/>' . PHP_EOL; $data .= '/>' . PHP_EOL;
} else { } else {
if (is_numeric($cellValue)) { if (trim($cellValue,'0123456789.') == '' /*similar to is_numeric without having PHPs regular quirkiness*/) {
$data .= '><v>' . $cellValue . '</v></c>' . PHP_EOL; $data .= '><v>' . $cellValue . '</v></c>' . PHP_EOL;
} else { } else {
if ($this->shouldUseInlineStrings) { if ($this->shouldUseInlineStrings) {