Skip to content

Commit fc32b06

Browse files
committed
Merge branch 'master' into add-two-cell-anchor-drawing
2 parents abe5ca8 + f575d2b commit fc32b06

File tree

539 files changed

+17015
-8061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

539 files changed

+17015
-8061
lines changed

CHANGELOG.md

+66-18
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,46 @@ and this project adheres to [Semantic Versioning](https://semver.org).
99

1010
### Added
1111

12+
- Implementation of the ISREF() information function
13+
14+
### Changed
15+
16+
- Gnumeric Reader now loads number formatting for cells.
17+
- Gnumeric Reader now correctly identifies selected worksheet.
18+
- Some Refactoring of the Ods Reader, moving all formula and address translation from Ods to Excel into a separate class to eliminate code duplication and ensure consistency.
19+
20+
### Deprecated
21+
22+
- 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.
23+
24+
### Removed
25+
26+
- Nothing
27+
28+
### Fixed
29+
30+
- Fixed behaviour of XLSX font style vertical align settings
31+
- Resolved formula translations to handle separators (row and column) for array functions as well as for function argument separators; and cleanly handle nesting levels.
32+
33+
Note that this method is used when translating Excel functions between en and other locale languages, as well as when converting formulae between different spreadsheet formats (e.g. Ods to Excel).
34+
35+
Nor is this a perfect solution, as there may still be issues when function calls have array arguments that themselves contain function calls; but it's still better than the current logic.
36+
37+
38+
## 1.22.0 - 2022-02-18
39+
40+
### Added
41+
42+
- Namespacing phase 2 - styles.
43+
[PR #2471](https://github.com/PHPOffice/PhpSpreadsheet/pull/2471)
44+
45+
- Improved support for passing of array arguments to Excel function implementations to return array results (where appropriate). [Issue #2551](https://github.com/PHPOffice/PhpSpreadsheet/issues/2551)
46+
47+
This is the first stage in an ongoing process of adding array support to all appropriate function implementations,
48+
- Support for the Excel365 Math/Trig SEQUENCE() function [PR #2536](https://github.com/PHPOffice/PhpSpreadsheet/pull/2536)
49+
- Support for the Excel365 Math/Trig RANDARRAY() function [PR #2540](https://github.com/PHPOffice/PhpSpreadsheet/pull/2540)
50+
51+
Note that the Spill Operator is not yet supported in the Calculation Engine; but this can still be useful for defining array constants.
1252
- Improved support for Conditional Formatting Rules [PR #2491](https://github.com/PHPOffice/PhpSpreadsheet/pull/2491)
1353
- Provide support for a wider range of Conditional Formatting Rules for Xlsx Reader/Writer:
1454
- Cells Containing (cellIs)
@@ -25,11 +65,18 @@ and this project adheres to [Semantic Versioning](https://semver.org).
2565
- Full support of the above CF Rules for the Xlsx Reader and Writer; even when the file being loaded has CF rules listed in the `<extLst><ext><ConditionalFormattings>` element for the worksheet rather than the `<ConditionalFormatting>` element.
2666
- Provision of a CellMatcher to identify if rules are matched for a cell, and which matching style will be applied.
2767
- Improved documentation and examples, covering all supported CF rule types.
68+
- Add support for one digit decimals (FORMAT_NUMBER_0, FORMAT_PERCENTAGE_0). [PR #2525](https://github.com/PHPOffice/PhpSpreadsheet/pull/2525)
69+
- Initial work enabling Excel function implementations for handling arrays as arguments when used in "array formulae" [#2562](https://github.com/PHPOffice/PhpSpreadsheet/issues/2562)
70+
- Enable most of the Date/Time functions to accept array arguments [#2573](https://github.com/PHPOffice/PhpSpreadsheet/issues/2573)
71+
- Array ready functions - Text, Math/Trig, Statistical, Engineering and Logical [#2580](https://github.com/PHPOffice/PhpSpreadsheet/issues/2580)
2872
- Support for two cell anchor drawing of images.
2973

3074
### Changed
3175

32-
- Nothing
76+
- Additional Russian translations for Excel Functions (courtesy of aleks-samurai).
77+
- Improved code coverage for NumberFormat. [PR #2556](https://github.com/PHPOffice/PhpSpreadsheet/pull/2556)
78+
- Extract some methods from the Calculation Engine into dedicated classes [#2537](https://github.com/PHPOffice/PhpSpreadsheet/issues/2537)
79+
- Eliminate calls to `flattenSingleValue()` that are no longer required when we're checking for array values as arguments [#2590](https://github.com/PHPOffice/PhpSpreadsheet/issues/2590)
3380

3481
### Deprecated
3582

@@ -41,24 +88,25 @@ and this project adheres to [Semantic Versioning](https://semver.org).
4188

4289
### Fixed
4390

91+
- Fixed `ReferenceHelper@insertNewBefore` behavior when removing column before last column with null value [PR #2541](https://github.com/PHPOffice/PhpSpreadsheet/pull/2541)
92+
- Fix bug with `DOLLARDE()` and `DOLLARFR()` functions when the dollar value is negative [Issue #2578](https://github.com/PHPOffice/PhpSpreadsheet/issues/2578) [PR #2579](https://github.com/PHPOffice/PhpSpreadsheet/pull/2579)
93+
- Fix partial function name matching when translating formulae from Russian to English [Issue #2533](https://github.com/PHPOffice/PhpSpreadsheet/issues/2533) [PR #2534](https://github.com/PHPOffice/PhpSpreadsheet/pull/2534)
4494
- Various bugs related to Conditional Formatting Rules, and errors in the Xlsx Writer for Conditional Formatting [PR #2491](https://github.com/PHPOffice/PhpSpreadsheet/pull/2491)
45-
- Xlsx Reader merge range fixes.
46-
[Issue #2501](https://github.com/PHPOffice/PhpSpreadsheet/issues/2501)
47-
[PR #2504](https://github.com/PHPOffice/PhpSpreadsheet/pull/2504)
48-
- Handle explicit "date" type for Cell in Xlsx Reader.
49-
[Issue #2373](https://github.com/PHPOffice/PhpSpreadsheet/issues/2373)
50-
[PR #2485](https://github.com/PHPOffice/PhpSpreadsheet/pull/2485)
51-
- Recalibrate Row/Column Dimensions after removeRow/Column.
52-
[Issue #2442](https://github.com/PHPOffice/PhpSpreadsheet/issues/2442)
53-
[PR #2486](https://github.com/PHPOffice/PhpSpreadsheet/pull/2486)
54-
- Refinement for XIRR.
55-
[Issue #2469](https://github.com/PHPOffice/PhpSpreadsheet/issues/2469)
56-
[PR #2487](https://github.com/PHPOffice/PhpSpreadsheet/pull/2487)
57-
- Xlsx Reader handle cell with non-null explicit type but null value.
58-
[Issue #2488](https://github.com/PHPOffice/PhpSpreadsheet/issues/2488)
59-
[PR #2489](https://github.com/PHPOffice/PhpSpreadsheet/pull/2489)
60-
- Xlsx Reader fix height and width for oneCellAnchorDrawings.
61-
[PR #2492](https://github.com/PHPOffice/PhpSpreadsheet/pull/2492)
95+
- Xlsx Reader merge range fixes. [Issue #2501](https://github.com/PHPOffice/PhpSpreadsheet/issues/2501) [PR #2504](https://github.com/PHPOffice/PhpSpreadsheet/pull/2504)
96+
- Handle explicit "date" type for Cell in Xlsx Reader. [Issue #2373](https://github.com/PHPOffice/PhpSpreadsheet/issues/2373) [PR #2485](https://github.com/PHPOffice/PhpSpreadsheet/pull/2485)
97+
- Recalibrate Row/Column Dimensions after removeRow/Column. [Issue #2442](https://github.com/PHPOffice/PhpSpreadsheet/issues/2442) [PR #2486](https://github.com/PHPOffice/PhpSpreadsheet/pull/2486)
98+
- Refinement for XIRR. [Issue #2469](https://github.com/PHPOffice/PhpSpreadsheet/issues/2469) [PR #2487](https://github.com/PHPOffice/PhpSpreadsheet/pull/2487)
99+
- Xlsx Reader handle cell with non-null explicit type but null value. [Issue #2488](https://github.com/PHPOffice/PhpSpreadsheet/issues/2488) [PR #2489](https://github.com/PHPOffice/PhpSpreadsheet/pull/2489)
100+
- Xlsx Reader fix height and width for oneCellAnchorDrawings. [PR #2492](https://github.com/PHPOffice/PhpSpreadsheet/pull/2492)
101+
- Fix rounding error in NumberFormat::NUMBER_PERCENTAGE, NumberFormat::NUMBER_PERCENTAGE_00. [PR #2555](https://github.com/PHPOffice/PhpSpreadsheet/pull/2555)
102+
- Don't treat thumbnail file as xml. [Issue #2516](https://github.com/PHPOffice/PhpSpreadsheet/issues/2516) [PR #2517](https://github.com/PHPOffice/PhpSpreadsheet/pull/2517)
103+
- Eliminating Xlsx Reader warning when no sz tag for RichText. [Issue #2542](https://github.com/PHPOffice/PhpSpreadsheet/issues/2542) [PR #2550](https://github.com/PHPOffice/PhpSpreadsheet/pull/2550)
104+
- Fix Xlsx/Xls Writer handling of inline strings. [Issue #353](https://github.com/PHPOffice/PhpSpreadsheet/issues/353) [PR #2569](https://github.com/PHPOffice/PhpSpreadsheet/pull/2569)
105+
- Richtext colors were not being read correctly after namespace change [#2458](https://github.com/PHPOffice/PhpSpreadsheet/issues/2458)
106+
- Fix discrepancy between the way markdown tables are rendered in ReadTheDocs and in PHPStorm [#2520](https://github.com/PHPOffice/PhpSpreadsheet/issues/2520)
107+
- Update Russian Functions Text File [#2557](https://github.com/PHPOffice/PhpSpreadsheet/issues/2557)
108+
- Fix documentation, instantiation example [#2564](https://github.com/PHPOffice/PhpSpreadsheet/issues/2564)
109+
62110

63111
## 1.21.0 - 2022-01-06
64112

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"dompdf/dompdf": "^1.0",
8383
"friendsofphp/php-cs-fixer": "^3.2",
8484
"jpgraph/jpgraph": "^4.0",
85-
"mpdf/mpdf": "8.0.15",
85+
"mpdf/mpdf": "8.0.17",
8686
"phpcompatibility/php-compatibility": "^9.3",
8787
"phpstan/phpstan": "^1.1",
8888
"phpstan/phpstan-phpunit": "^1.0",

composer.lock

+36-36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/topics/reading-and-writing-to-file.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,25 @@ $reader->setSheetIndex(5);
544544
$reader->loadIntoExisting("05featuredemo.csv", $spreadsheet);
545545
```
546546

547+
#### Line endings
548+
549+
Line endings for Unix (`\n`) and Windows (`\r\n`) are supported.
550+
551+
Mac line endings (`\r`) are supported as long as PHP itself
552+
supports them, which it does through release 8.0.
553+
Support for Mac line endings is deprecated for 8.1,
554+
and is scheduled to remain deprecated for all later PHP8 releases;
555+
PhpSpreadsheet will continue to support them for 8.*.
556+
Support is scheduled to be dropped with release 9;
557+
PhpSpreadsheet will then no longer handle CSV files
558+
with Mac line endings correctly.
559+
560+
You can suppress testing for Mac line endings as follows:
561+
```php
562+
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
563+
$reader->setTestAutoDetect(false);
564+
```
565+
547566
### \PhpOffice\PhpSpreadsheet\Writer\Csv
548567

549568
#### Writing a CSV file
@@ -860,7 +879,7 @@ $writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Pdf')
860879
Or you can instantiate directly the writer of your choice like so:
861880

862881
```php
863-
$writer = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
882+
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
864883
```
865884

866885
#### Custom implementation or configuration

0 commit comments

Comments
 (0)