Loading src/Calc/Sheet.php +8 −7 Changes for src/Calc/Sheet.php: 8 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -92,16 +92,12 @@ class Sheet protected function readRow(DOMNode $rowNode, int $row) { $cells = $rowNode->childNodes; $col = 0; $col = 1; foreach ($cells as $c) { $col++; if ('table:covered-table-cell' == $c->tagName) { $col--; } if ('table:table-cell' == $c->tagName) { $cell = new Cell($c); if ($r = $cell->getRepeated()){ $col += $r - 1; $col += $r; continue; } $init = true; Loading Loading @@ -227,8 +223,13 @@ class Sheet public function html(): string { $h = '<table class="table table-bordered table-condensed">'; $h .= '<tr><th></th>'; for( $c=1;$c<=$this->getMaxCol();$c++){ $h .= '<th>'.(Calc::numberToLetter($c)).'</th>'; } $h .= '</tr>'; for( $r=1;$r<=$this->getMaxRow();$r++){ $h .= '<tr>'; $h .= '<tr><th>'.$r.'</th>'; for( $c=1;$c<=$this->getMaxCol();$c++){ $cell = $this->getCellByCoords($c,$r); $h .= '<td>'.($cell ? $cell->getContent() : '').'</td>'; Loading Loading
src/Calc/Sheet.php +8 −7 Changes for src/Calc/Sheet.php: 8 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -92,16 +92,12 @@ class Sheet protected function readRow(DOMNode $rowNode, int $row) { $cells = $rowNode->childNodes; $col = 0; $col = 1; foreach ($cells as $c) { $col++; if ('table:covered-table-cell' == $c->tagName) { $col--; } if ('table:table-cell' == $c->tagName) { $cell = new Cell($c); if ($r = $cell->getRepeated()){ $col += $r - 1; $col += $r; continue; } $init = true; Loading Loading @@ -227,8 +223,13 @@ class Sheet public function html(): string { $h = '<table class="table table-bordered table-condensed">'; $h .= '<tr><th></th>'; for( $c=1;$c<=$this->getMaxCol();$c++){ $h .= '<th>'.(Calc::numberToLetter($c)).'</th>'; } $h .= '</tr>'; for( $r=1;$r<=$this->getMaxRow();$r++){ $h .= '<tr>'; $h .= '<tr><th>'.$r.'</th>'; for( $c=1;$c<=$this->getMaxCol();$c++){ $cell = $this->getCellByCoords($c,$r); $h .= '<td>'.($cell ? $cell->getContent() : '').'</td>'; Loading