Normalised numeric handling between XLS and XLSX, plus PSR2
This commit is contained in:
parent
de1d1c8397
commit
6eef69634b
@ -139,7 +139,7 @@ EOD;
|
|||||||
if (empty($cellValue)) {
|
if (empty($cellValue)) {
|
||||||
$data .= '/>' . PHP_EOL;
|
$data .= '/>' . PHP_EOL;
|
||||||
} else {
|
} 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 .= '><v>' . $cellValue . '</v></c>' . PHP_EOL;
|
$data .= '><v>' . $cellValue . '</v></c>' . PHP_EOL;
|
||||||
} else {
|
} else {
|
||||||
if ($this->shouldUseInlineStrings) {
|
if ($this->shouldUseInlineStrings) {
|
||||||
|
@ -143,7 +143,7 @@ class XLS extends AbstractWriter
|
|||||||
|
|
||||||
$this->home();
|
$this->home();
|
||||||
foreach ($dataRow as $cell) {
|
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);
|
$wasWriteSuccessful = $wasWriteSuccessful && $this->number($cell);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user