@@ 1172-1176 (lines=5) @@ | ||
1169 | // Uppercase coordinate |
|
1170 | $pCoordinate = strtoupper($pCoordinate); |
|
1171 | ||
1172 | if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) { |
|
1173 | throw new Exception('Cell coordinate can not be a range of cells.'); |
|
1174 | } elseif (strpos($pCoordinate, '$') !== false) { |
|
1175 | throw new Exception('Cell coordinate must not be absolute.'); |
|
1176 | } |
|
1177 | ||
1178 | // Create new cell object, if required |
|
1179 | return $createIfNotExists ? $this->createNewCell($pCoordinate) : null; |
@@ 670-676 (lines=7) @@ | ||
667 | */ |
|
668 | public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) |
|
669 | { |
|
670 | if (strpos($value, '!') !== false) { |
|
671 | throw new \PhpSpreadsheet\Exception('Cell coordinate must not specify a worksheet.'); |
|
672 | } elseif (strpos($value, ':') === false) { |
|
673 | throw new \PhpSpreadsheet\Exception('Cell coordinate must be a range of cells.'); |
|
674 | } elseif (strpos($value, '$') !== false) { |
|
675 | throw new \PhpSpreadsheet\Exception('Cell coordinate must not be absolute.'); |
|
676 | } |
|
677 | $value = strtoupper($value); |
|
678 | ||
679 | if ($method == self::SETPRINTRANGE_OVERWRITE) { |