@@ 678-684 (lines=7) @@ | ||
675 | */ |
|
676 | public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) |
|
677 | { |
|
678 | if (strpos($value, '!') !== false) { |
|
679 | throw new PhpSpreadsheetException('Cell coordinate must not specify a worksheet.'); |
|
680 | } elseif (strpos($value, ':') === false) { |
|
681 | throw new PhpSpreadsheetException('Cell coordinate must be a range of cells.'); |
|
682 | } elseif (strpos($value, '$') !== false) { |
|
683 | throw new PhpSpreadsheetException('Cell coordinate must not be absolute.'); |
|
684 | } |
|
685 | $value = strtoupper($value); |
|
686 | ||
687 | if ($method == self::SETPRINTRANGE_OVERWRITE) { |
@@ 2322-2328 (lines=7) @@ | ||
2319 | // Uppercase coordinate |
|
2320 | $pCellCoordinate = strtoupper($pCellCoordinate); |
|
2321 | ||
2322 | if (strpos($pCellCoordinate, ':') !== false || strpos($pCellCoordinate, ',') !== false) { |
|
2323 | throw new Exception('Cell coordinate string can not be a range of cells.'); |
|
2324 | } elseif (strpos($pCellCoordinate, '$') !== false) { |
|
2325 | throw new Exception('Cell coordinate string must not be absolute.'); |
|
2326 | } elseif ($pCellCoordinate == '') { |
|
2327 | throw new Exception('Cell coordinate can not be zero-length string.'); |
|
2328 | } |
|
2329 | ||
2330 | // Check if we already have a comment for this cell. |
|
2331 | if (isset($this->comments[$pCellCoordinate])) { |