/** * Check row and col before writing to a cell, and update the sheet's * dimensions accordingly * @param integer $row Zero indexed row * @param integer $col Zero indexed column * @return Cell */ protected function addCell($row, $col) { $cell = new Cell($row, $col); $this->dimensions->expand($cell); return $cell; }