Merge 8a6277e4da625f8ddc9f22ca96b56e409b9efe1c into 582da8403d22bd4f284cce8c963513819137ec58

This commit is contained in:
ivanchenkoandriy 2015-11-06 09:01:16 +00:00
commit 494f2471c8

View File

@ -134,10 +134,10 @@ EOD;
$data = '<row r="' . $rowIndex . '" spans="1:' . $numCells . '">'; $data = '<row r="' . $rowIndex . '" spans="1:' . $numCells . '">';
foreach ($dataRow as $cellValue) { foreach ($dataRow as $cellValue) {
if (!empty($cellValue)) {
$columnIndex = CellHelper::getCellIndexFromColumnIndex($cellNumber); $columnIndex = CellHelper::getCellIndexFromColumnIndex($cellNumber);
$data .= '<c r="' . $columnIndex . $rowIndex . '"'; $data .= '<c r="' . $columnIndex . $rowIndex . '"';
$data .= ' s="' . $style->getId() . '"'; $data .= ' s="' . $style->getId() . '"';
if (CellHelper::isNonEmptyString($cellValue)) { if (CellHelper::isNonEmptyString($cellValue)) {
if ($this->shouldUseInlineStrings) { if ($this->shouldUseInlineStrings) {
$data .= ' t="inlineStr"><is><t>' . $this->stringsEscaper->escape($cellValue) . '</t></is></c>'; $data .= ' t="inlineStr"><is><t>' . $this->stringsEscaper->escape($cellValue) . '</t></is></c>';
@ -149,12 +149,10 @@ EOD;
$data .= ' t="b"><v>' . $cellValue . '</v></c>'; $data .= ' t="b"><v>' . $cellValue . '</v></c>';
} else if (CellHelper::isNumeric($cellValue)) { } else if (CellHelper::isNumeric($cellValue)) {
$data .= '><v>' . $cellValue . '</v></c>'; $data .= '><v>' . $cellValue . '</v></c>';
} else if (empty($cellValue)) {
$data .= '/>';
} else { } else {
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . gettype($cellValue)); throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . gettype($cellValue));
} }
}
$cellNumber++; $cellNumber++;
} }