Skip to content

Commit 3bb6b42

Browse files
author
MarkBaker
committed
Merge branch 'master' into CalculationEngine-Array-Formulae-Initial-Work
# Conflicts: # phpstan-baseline.neon # src/PhpSpreadsheet/Worksheet/Worksheet.php
2 parents a3130ef + a6cb80f commit 3bb6b42

33 files changed

+1872
-321
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'braces' => true,
2222
'cast_spaces' => true,
2323
'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']], // const are often grouped with other related const
24-
'class_definition' => true,
24+
'class_definition' => false,
2525
'class_keyword_remove' => false, // ::class keyword gives us better support in IDE
2626
'combine_consecutive_issets' => true,
2727
'combine_consecutive_unsets' => true,

CHANGELOG.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org).
99

1010
### Added
1111

12-
- Implementation of the FILTER(), SORT(), SORTBY() and UNIQUE() Lookup/Reference (array) functions
12+
- Introduced CellAddress, CellRange, RowRange and ColumnRange value objects that can be used as an alternative to a string value (e.g. `'C5'`, `'B2:D4'`, `'2:2'` or `'B:C'`) in appropriate contexts.
13+
- Implementation of the FILTER(), SORT(), SORTBY() and UNIQUE() Lookup/Reference (array) functions.
1314
- Implementation of the ISREF() Information function.
1415
- Added support for reading "formatted" numeric values from Csv files; although default behaviour of reading these values as strings is preserved.
1516

@@ -37,6 +38,27 @@ and this project adheres to [Semantic Versioning](https://semver.org).
3738
### Deprecated
3839

3940
- All Excel Function implementations in `Calculation\Functions` (including the Error functions) have been moved to dedicated classes for groups of related functions. See the docblocks against all the deprecated methods for details of the new methods to call instead. At some point, these old classes will be deleted.
41+
- Worksheet methods that reference cells "byColumnandRow". All such methods have an equivalent that references the cell by its address (e.g. '`E3'` rather than `5, 3`).
42+
43+
These functions now accept either a cell address string (`'E3')` or an array with columnId and rowId (`[5, 3]`) or a new `CellAddress` object as their `cellAddress`/`coordinate` argument.
44+
This includes the methods:
45+
- `setCellValueByColumnAndRow()` use the equivalent `setCellValue()`
46+
- `setCellValueExplicitByColumnAndRow()` use the equivalent `setCellValueExplicit()`
47+
- `getCellByColumnAndRow()` use the equivalent `getCell()`
48+
- `cellExistsByColumnAndRow()` use the equivalent `cellExists()`
49+
- `getStyleByColumnAndRow()` use the equivalent `getStyle()`
50+
- `setBreakByColumnAndRow()` use the equivalent `setBreak()`
51+
- `mergeCellsByColumnAndRow()` use the equivalent `mergeCells()`
52+
- `unmergeCellsByColumnAndRow()` use the equivalent `unmergeCells()`
53+
- `protectCellsByColumnAndRow()` use the equivalent `protectCells()`
54+
- `unprotectCellsByColumnAndRow()` use the equivalent `unprotectCells()`
55+
- `setAutoFilterByColumnAndRow()` use the equivalent `setAutoFilter()`
56+
- `freezePaneByColumnAndRow()` use the equivalent `freezePane()`
57+
- `getCommentByColumnAndRow()` use the equivalent `getComment()`
58+
- `setSelectedCellByColumnAndRow()` use the equivalent `setSelectedCells()`
59+
60+
This change provides more consistency in the methods (not every "by cell address" method has an equivalent "byColumnAndRow" method);
61+
and the "by cell address" methods often provide more flexibility, such as allowing a range of cells, or referencing them by passing the defined name of a named range as the argument.
4062

4163
### Removed
4264

0 commit comments

Comments
 (0)