Test $this->_includeCharts before including charts in HTML Writer
This commit is contained in:
parent
5a32eee110
commit
2d6f3979d9
|
@ -512,6 +512,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
|
|||
private function _extendRowsForChartsAndImages(PHPExcel_Worksheet $pSheet, $row) {
|
||||
$rowMax = $row;
|
||||
$colMax = 'A';
|
||||
if ($this->_includeCharts) {
|
||||
foreach ($pSheet->getChartCollection() as $chart) {
|
||||
if ($chart instanceof PHPExcel_Chart) {
|
||||
$chartCoordinates = $chart->getTopLeftPosition();
|
||||
|
@ -525,6 +526,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($pSheet->getDrawingCollection() as $drawing) {
|
||||
if ($drawing instanceof PHPExcel_Worksheet_Drawing) {
|
||||
|
@ -545,7 +547,9 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
|
|||
for ($col = 'A'; $col != $colMax; ++$col) {
|
||||
$html .= '<td>';
|
||||
$html .= $this->_writeImageInCell($pSheet, $col.$row);
|
||||
if ($this->_includeCharts) {
|
||||
$html .= $this->_writeChartInCell($pSheet, $col.$row);
|
||||
}
|
||||
$html .= '</td>';
|
||||
}
|
||||
++$row;
|
||||
|
|
Loading…
Reference in New Issue