Пример #1
0
 /**
  * Parse colspans
  * @param  LaravelExcelWorksheet $sheet
  * @param  string                $column
  * @param  integer               $row
  * @param  integer               $spanHeight
  * @param                        $attributes
  * @return void
  */
 protected function parseRowSpan($sheet, $column, $row, $spanHeight, $attributes)
 {
     // Set the span height
     $this->spanHeight = --$spanHeight;
     // Set start cell
     $startCell = $column . $row;
     // Set endcell = current row number + spanheight
     $endCell = $column . ($row + $this->spanHeight);
     $range = $startCell . ':' . $endCell;
     // Remember css inline styles
     //foreach($attributes as $attribute)
     //{
     //    if($attribute->name == 'style')
     //    {
     //        $this->styles[$range] = $attribute->value;
     //    }
     //}
     // Merge the cells
     $sheet->mergeCells($range);
 }
Пример #2
0
 /**
  * Parse colspans
  * @param  LaravelExcelWorksheet $sheet
  * @param  string $column
  * @param  integer $row
  * @param  integer $spanHeight
  * @return void
  */
 protected function parseRowSpan($sheet, $column, $row, $spanHeight)
 {
     // Set the spanHeight
     $this->spanHeight = $spanHeight;
     $startCell = $column . $row;
     $endCell = $column . $row * $spanHeight;
     $range = $startCell . ':' . $endCell;
     $sheet->mergeCells($range);
 }