10 Commits

Author SHA1 Message Date
kemo e599953942 Replace serialize/unserialize in Spreadsheet::copy() with clone 2026-03-10 15:04:47 +01:00
oleibman 002f618416 More Tests and a Sample 2026-01-06 11:50:31 -08:00
oleibman e9cc5b1226 Fix Clone Spreadsheet With Defined Names
When a spreadsheet containing defined names is cloned, the worksheets pointed to by the defined names in the cloned spreadsheet are actually clones of the intended worksheets. Fix this, add tests.
2025-12-22 09:48:34 -08:00
oleibman f1ce95eaa4 Shared/Date::isDateTime Handle Cells Which Calculate as Arrays
In issue #4557, the user complains, with some justification, about the way Excel handles certain calculations. We are not able to help with that problem. However, the user also notes a problem in Shared/Date when `isDateTime` has to evaluate a cell whose calculated value is an array. This is solved by flattening the calculated result to a single value.

It became obvious while working on this change that the code to set `instanceArrayReturnType` was kind of awkward. Simpler methods `returnArrayAsArray` and `returnArrayAsValue` are added to `Spreadsheet`. Even these started out a bit awkward because `Spreadsheet::calculationEngine` was defined as nullable, which really isn't true. It is allocated by the constructor, and never freed except in the destructor. It is no longer nullable.
2025-07-30 17:19:26 -07:00
oleibman 5c94de34a9 More Phpstan Level 10 Prep - Readers
Also upgrade Phpstan.
2025-05-03 21:18:55 -07:00
oleibman 60c7e35124 Fix Phpstan Errors 2025-03-23 00:31:04 -07:00
oleibman 9875233c7e Tweak to Spreadsheet Clone
Spreadsheet clone already copies Calculation instanceArrayReturnType property. It should also copy some other Calculation instance properties, namely suppressFormulaErrors, calculationCacheEnabled, and branchPruningEnabled.
2025-03-23 00:11:02 -07:00
oleibman 11a0962bfb Eliminate Some Dead Code 2025-02-20 10:16:48 -08:00
oleibman abd53a011a Additional Tests 2025-02-20 09:09:31 -08:00
oleibman 49bab44c69 Allow Clone on Spreadsheet
Since we have a usable copy method in Spreadsheet, this is probably overkill, especially with serialization now allowed. Nevertheless, I would prefer to not artificially render a standard Php operation (clone) unusable.
2025-02-16 13:53:25 -08:00