Skip to content

Commit aa719cd

Browse files
authored
Merge branch 'master' into explicit
2 parents 78190ff + 98206d9 commit aa719cd

File tree

266 files changed

+1523
-495
lines changed

Some content is hidden

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

266 files changed

+1523
-495
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- '8.2'
1515
- '8.3'
1616
- '8.4'
17+
- '8.5'
1718

1819
include:
1920
- php-version: 'nightly'

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org). Thia is a
99

1010
### Added
1111

12-
- Nothing yet.
12+
- Formal support for Php8.5.
13+
- Limited Printarea support for Html/Pdf. [Issue #3941](https://github.com/PHPOffice/PhpSpreadsheet/issues/3941) [PR #4711](https://github.com/PHPOffice/PhpSpreadsheet/pull/4711)
14+
- Implement missing `INFO` function. [PR #4709](https://github.com/PHPOffice/PhpSpreadsheet/pull/4709)
15+
- Implement missing `BAHTTEXT` function. [PR #4715](https://github.com/PHPOffice/PhpSpreadsheet/pull/4715)
1316

1417
### Removed
1518

@@ -29,7 +32,11 @@ and this project adheres to [Semantic Versioning](https://semver.org). Thia is a
2932

3033
### Fixed
3134

32-
- Nothing yet.
35+
- Protected ranges and insert/delete rows/columns. [Issue #4695](https://github.com/PHPOffice/PhpSpreadsheet/issues/4695) [PR #4702](https://github.com/PHPOffice/PhpSpreadsheet/pull/4702)
36+
- Unexpected Exception in Php DateTime. [Issue #4696](https://github.com/PHPOffice/PhpSpreadsheet/issues/4696) [Issue #917](https://github.com/PHPOffice/PhpSpreadsheet/issues/917) [PR #4697](https://github.com/PHPOffice/PhpSpreadsheet/pull/4697)
37+
- Add missing Dutch translation to translation file. [PR #4707](https://github.com/PHPOffice/PhpSpreadsheet/pull/4707)
38+
- Fix lots of typos throughout codebase. [PR #4705](https://github.com/PHPOffice/PhpSpreadsheet/pull/4705)
39+
- Apply small code style improvements. [PR #4708](https://github.com/PHPOffice/PhpSpreadsheet/pull/4708)
3340

3441
## 2025-10-25 - 5.2.0
3542

composer.lock

Lines changed: 42 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/references/function-list-by-category.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Excel Function | PhpSpreadsheet Function
189189
-------------------------|--------------------------------------
190190
CELL | **Not yet Implemented**
191191
ERROR.TYPE | \PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError::type
192-
INFO | **Not yet Implemented**
192+
INFO | \PhpOffice\PhpSpreadsheet\Calculation\Information\Info::getInfo
193193
ISBLANK | \PhpOffice\PhpSpreadsheet\Calculation\Information\Value::isBlank
194194
ISERR | \PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue::isErr
195195
ISERROR | \PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue::isError
@@ -525,7 +525,7 @@ Excel Function | PhpSpreadsheet Function
525525
-------------------------|--------------------------------------
526526
ARRAYTOTEXT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Text::fromArray
527527
ASC | **Not yet Implemented**
528-
BAHTTEXT | **Not yet Implemented**
528+
BAHTTEXT | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Thai::getBahtText
529529
CHAR | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::character
530530
CLEAN | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Trim::nonPrintable
531531
CODE | \PhpOffice\PhpSpreadsheet\Calculation\TextData\CharacterConvert::code

docs/references/function-list-by-name-compact.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ AVERAGEIFS | STATISTICAL | Statistical\Conditional::AVER
4343

4444
Excel Function | Category | PhpSpreadsheet Function
4545
-------------------------|-----------------------|--------------------------------------
46-
BAHTTEXT | TEXT_AND_DATA | **Not yet Implemented**
46+
BAHTTEXT | TEXT_AND_DATA | TextData\Thai::getBahtText
4747
BASE | MATH_AND_TRIG | MathTrig\Base::evaluate
4848
BESSELI | ENGINEERING | Engineering\BesselI::BESSELI
4949
BESSELJ | ENGINEERING | Engineering\BesselJ::BESSELJ
@@ -299,7 +299,7 @@ IMSUM | ENGINEERING | Engineering\ComplexOperations
299299
IMTAN | ENGINEERING | Engineering\ComplexFunctions::IMTAN
300300
INDEX | LOOKUP_AND_REFERENCE | LookupRef\Matrix::index
301301
INDIRECT | LOOKUP_AND_REFERENCE | LookupRef\Indirect::INDIRECT
302-
INFO | INFORMATION | **Not yet Implemented**
302+
INFO | INFORMATION | Information\Info::getInfo
303303
INT | MATH_AND_TRIG | MathTrig\IntClass::evaluate
304304
INTERCEPT | STATISTICAL | Statistical\Trends::INTERCEPT
305305
INTRATE | FINANCIAL | Financial\Securities\Rates::interest

docs/references/function-list-by-name.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ AVERAGEIFS | CATEGORY_STATISTICAL | \PhpOffice\PhpSpread
3939

4040
Excel Function | Category | PhpSpreadsheet Function
4141
-------------------------|--------------------------------|--------------------------------------
42-
BAHTTEXT | CATEGORY_TEXT_AND_DATA | **Not yet Implemented**
42+
BAHTTEXT | CATEGORY_TEXT_AND_DATA | \PhpOffice\PhpSpreadsheet\Calculation\TextData\Thai::getBahtText
4343
BASE | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\Base::evaluate
4444
BESSELI | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselI::BESSELI
4545
BESSELJ | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\BesselJ::BESSELJ
@@ -295,7 +295,7 @@ IMSUM | CATEGORY_ENGINEERING | \PhpOffice\PhpSpread
295295
IMTAN | CATEGORY_ENGINEERING | \PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions::IMTAN
296296
INDEX | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix::index
297297
INDIRECT | CATEGORY_LOOKUP_AND_REFERENCE | \PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Indirect::INDIRECT
298-
INFO | CATEGORY_INFORMATION | **Not yet Implemented**
298+
INFO | CATEGORY_INFORMATION | \PhpOffice\PhpSpreadsheet\Calculation\Information\Info::getInfo
299299
INT | CATEGORY_MATH_AND_TRIG | \PhpOffice\PhpSpreadsheet\Calculation\MathTrig\IntClass::evaluate
300300
INTERCEPT | CATEGORY_STATISTICAL | \PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends::INTERCEPT
301301
INTRATE | CATEGORY_FINANCIAL | \PhpOffice\PhpSpreadsheet\Calculation\Financial\Securities\Rates::interest

docs/topics/autofilters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ $columnFilter->createRule()
176176
In MS Excel, DateGroup filters provide a series of dropdown filter
177177
selectors for date values, so you can specify entire years, or months
178178
within a year, or individual days within each month.
179+
Note that cells covered by such a filter are expected to be in [Excel DateTime Format](./calculation-engine.md#excel-timestamps).
179180

180181
![04-02-dategroup-autofilter.png](./images/04-02-dategroup-autofilter.png)
181182

docs/topics/calculation-engine.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,20 +194,22 @@ Time functions in Excel will be a PHP `DateTime` object.
194194

195195
#### Excel Timestamps
196196

197-
If `RETURNDATE_EXCEL` is set for the Return Date Type, then the returned
198-
date value by any access to the Date and Time functions in Excel will be
199-
a floating point value that represents a number of days from the Excel
200-
base date. The Excel base date is determined by which calendar Excel
197+
Excel timestamps are stored as integer or floating point, where the integer portion represents the number of days since a base date,
198+
and the fraction portion represents the time of day (0 is midnight, 0.5 is noon, 0.999... is just before midnight the next day).
199+
The Excel base date is determined by which calendar Excel
201200
uses: the Windows 1900 or the Mac 1904 calendar. 1st January 1900 is the
202201
base date for the Windows 1900 calendar while 1st January 1904 is the
203202
base date for the Mac 1904 calendar.
204203

205-
It is possible for scripts to change the calendar used for calculating
206-
Excel date values by calling the
207-
`\PhpOffice\PhpSpreadsheet\Shared\Date::setExcelCalendar()` method:
204+
If `RETURNDATE_EXCEL` is set for the Return Date Type, then the returned
205+
date value by any access to the Date and Time functions in Excel will be
206+
a floating point value in Excel timestamp format (previous paragraph).
208207

208+
It is possible for scripts to change the calendar used for calculating
209+
Excel date values by calling:
209210
```php
210-
\PhpOffice\PhpSpreadsheet\Shared\Date::setExcelCalendar($baseDate);
211+
\PhpOffice\PhpSpreadsheet\Shared\Date::setExcelCalendar($baseDate); // static property, less preferred
212+
$spreadsheet->setExcelCalendar($baseDate); // instance property, preferred
211213
```
212214

213215
where the following constants can be used for `$baseDate`:
@@ -218,11 +220,10 @@ where the following constants can be used for `$baseDate`:
218220
The method will return a Boolean True on success, False on failure (e.g.
219221
if an invalid value is passed in).
220222

221-
The `\PhpOffice\PhpSpreadsheet\Shared\Date::getExcelCalendar()` method can
222-
be used to determine the current value of this setting:
223-
223+
The current value of this setting can be determined via:
224224
```php
225-
$baseDate = \PhpOffice\PhpSpreadsheet\Shared\Date::getExcelCalendar();
225+
$baseDate = \PhpOffice\PhpSpreadsheet\Shared\Date::getExcelCalendar(); // static
226+
$baseDate = $spreadsheet->getExcelCalendar(); // instance
226227
```
227228

228229
The default is `CALENDAR_WINDOWS_1900`.

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,3 @@ parameters:
1717
identifier: argument.type
1818
count: 1
1919
path: src/PhpSpreadsheet/ReferenceHelper.php
20-
21-
-
22-
message: '#^Cannot call method setParent\(\) on mixed\.$#'
23-
identifier: method.nonObject
24-
count: 1
25-
path: src/PhpSpreadsheet/Worksheet/AutoFilter.php

src/PhpSpreadsheet/Calculation/BinaryComparison.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static function compare(mixed $operand1, mixed $operand2, string $operato
5151
$operand2 = Calculation::unwrapResult($operand2);
5252
}
5353

54-
// Use case insensitive comparaison if not OpenOffice mode
54+
// Use case-insensitive comparison if not OpenOffice mode
5555
if (Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) {
5656
if (is_string($operand1)) {
5757
$operand1 = StringHelper::strToUpper($operand1);

0 commit comments

Comments
 (0)