/** * How many columns add/remove to coordinate * @param int $numCols positive value will add, negative will remove * @return Coordinate * @throws PhpExcelException */ public function shiftColBy($numCols = 0) { if (!is_int($numCols)) { throw new PhpExcelException('Only integer values are allowed.'); } $colNum = ExcelHelper::getExcelColumnNumber($this->col) + $numCols; if ($colNum < 1) { throw new PhpExcelException('Number of rows would get below 1.'); } $this->col = ExcelHelper::getExcelColumnName($colNum); return $this; }