@@ 1184-1188 (lines=5) @@ | ||
1181 | // Uppercase coordinate |
|
1182 | $pCoordinate = strtoupper($pCoordinate); |
|
1183 | ||
1184 | if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) { |
|
1185 | throw new Exception('Cell coordinate can not be a range of cells.'); |
|
1186 | } elseif (strpos($pCoordinate, '$') !== false) { |
|
1187 | throw new Exception('Cell coordinate must not be absolute.'); |
|
1188 | } |
|
1189 | ||
1190 | // Create new cell object, if required |
|
1191 | return $createIfNotExists ? $this->createNewCell($pCoordinate) : null; |
@@ 680-686 (lines=7) @@ | ||
677 | */ |
|
678 | public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) |
|
679 | { |
|
680 | if (strpos($value, '!') !== false) { |
|
681 | throw new \PhpOffice\PhpSpreadsheet\Exception('Cell coordinate must not specify a worksheet.'); |
|
682 | } elseif (strpos($value, ':') === false) { |
|
683 | throw new \PhpOffice\PhpSpreadsheet\Exception('Cell coordinate must be a range of cells.'); |
|
684 | } elseif (strpos($value, '$') !== false) { |
|
685 | throw new \PhpOffice\PhpSpreadsheet\Exception('Cell coordinate must not be absolute.'); |
|
686 | } |
|
687 | $value = strtoupper($value); |
|
688 | ||
689 | if ($method == self::SETPRINTRANGE_OVERWRITE) { |