Add consistency using getCellXML()

This commit is contained in:
Adrien Loison 2016-09-06 19:31:58 -07:00
parent 435a9a016e
commit 9dd4a56a64
2 changed files with 4 additions and 4 deletions

View File

@ -155,7 +155,7 @@ class Worksheet implements WorksheetInterface
$currentCellValue !== $dataRowWithNumericIndexes[$nextCellIndex]) {
$numTimesValueRepeated = ($nextCellIndex - $currentCellIndex);
$data .= $this->getCellContent($currentCellValue, $styleIndex, $numTimesValueRepeated);
$data .= $this->getCellXML($currentCellValue, $styleIndex, $numTimesValueRepeated);
$currentCellIndex = $nextCellIndex;
}
@ -183,7 +183,7 @@ class Worksheet implements WorksheetInterface
* @return string The cell XML content
* @throws \Box\Spout\Common\Exception\InvalidArgumentException If a cell value's type is not supported
*/
protected function getCellContent($cellValue, $styleIndex, $numTimesValueRepeated)
protected function getCellXML($cellValue, $styleIndex, $numTimesValueRepeated)
{
$data = '<table:table-cell table:style-name="ce' . $styleIndex . '"';

View File

@ -134,7 +134,7 @@ EOD;
$rowXML = '<row r="' . $rowIndex . '" spans="1:' . $numCells . '">';
foreach($dataRow as $cellValue) {
$rowXML .= $this->getCellXml($rowIndex, $cellNumber, $cellValue, $style->getId());
$rowXML .= $this->getCellXML($rowIndex, $cellNumber, $cellValue, $style->getId());
$cellNumber++;
}
@ -159,7 +159,7 @@ EOD;
* @return string
* @throws InvalidArgumentException
*/
private function getCellXml($rowIndex, $cellNumber, $cellValue, $styleId)
private function getCellXML($rowIndex, $cellNumber, $cellValue, $styleId)
{
$columnIndex = CellHelper::getCellIndexFromColumnIndex($cellNumber);
$cellXML = '<c r="' . $columnIndex . $rowIndex . '"';