diff --git a/src/Spout/Writer/Internal/XLSX/Worksheet.php b/src/Spout/Writer/Internal/XLSX/Worksheet.php index 5f919f6..8007d3d 100644 --- a/src/Spout/Writer/Internal/XLSX/Worksheet.php +++ b/src/Spout/Writer/Internal/XLSX/Worksheet.php @@ -139,7 +139,7 @@ EOD; if (empty($cellValue)) { $data .= '/>' . PHP_EOL; } else { - if (trim($cellValue,'0123456789.') == '' /*similar to is_numeric without having PHPs regular quirkiness*/) { + if (trim($cellValue, '0123456789.') == '' /*similar to is_numeric without having PHPs regular quirkiness*/) { $data .= '>' . $cellValue . '' . PHP_EOL; } else { if ($this->shouldUseInlineStrings) { diff --git a/src/Spout/Writer/XLS.php b/src/Spout/Writer/XLS.php index dc3a295..e84b0db 100644 --- a/src/Spout/Writer/XLS.php +++ b/src/Spout/Writer/XLS.php @@ -143,7 +143,7 @@ class XLS extends AbstractWriter $this->home(); foreach ($dataRow as $cell) { - if (is_integer($cell)) { + if (trim($cell, '0123456789.') == '' /*similar to is_numeric without having PHPs regular quirkiness*/) { $wasWriteSuccessful = $wasWriteSuccessful && $this->number($cell); } else {