private function PHPExcel_Writer_OpenDocument_Content::_writeRows in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Content.php \PHPExcel_Writer_OpenDocument_Content::_writeRows()
Write rows of the specified sheet
Parameters
PHPExcel_Shared_XMLWriter $objWriter:
PHPExcel_Worksheet $sheet:
1 call to PHPExcel_Writer_OpenDocument_Content::_writeRows()
- PHPExcel_Writer_OpenDocument_Content::_writeSheets in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ OpenDocument/ Content.php - Write sheets
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ OpenDocument/ Content.php, line 146
Class
- PHPExcel_Writer_OpenDocument_Content
- PHPExcel_Writer_OpenDocument_Content
Code
private function _writeRows(PHPExcel_Shared_XMLWriter $objWriter, PHPExcel_Worksheet $sheet) {
$number_rows_repeated = self::NUMBER_ROWS_REPEATED_MAX;
$span_row = 0;
$rows = $sheet
->getRowIterator();
while ($rows
->valid()) {
$number_rows_repeated--;
$row = $rows
->current();
if ($row
->getCellIterator()
->valid()) {
if ($span_row) {
$objWriter
->startElement('table:table-row');
if ($span_row > 1) {
$objWriter
->writeAttribute('table:number-rows-repeated', $span_row);
}
$objWriter
->startElement('table:table-cell');
$objWriter
->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX);
$objWriter
->endElement();
$objWriter
->endElement();
$span_row = 0;
}
$objWriter
->startElement('table:table-row');
$this
->_writeCells($objWriter, $row);
$objWriter
->endElement();
}
else {
$span_row++;
}
$rows
->next();
}
}