Skip to content

Calculation engine array formulae initial work #2539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 115 commits into from

Conversation

MarkBaker
Copy link
Member

@MarkBaker MarkBaker commented Jan 30, 2022

This is:

- [ ] a bugfix
- [X] a new feature

Checklist:

Why this change is needed?

Initial support for reading/writing array formulae with the Xlsx Reader/Writer

Work to allow setting array formulae from userland code looks like it will create a BC break. It requires extra arguments for the Cell setValue() and setValueExplicit() methods - the equivalent of pressing Ctrl-Enter when entering an array formula in MS Excel - (unless I can come up with some creative alternative, like executing the formula at the point when it is set to identify if it is an array formula or not; and if so, what the spillage cell range should be); and these additional arguments must be passed to the Cell Binder creating a BC break for the BinderInterface.

Only supports the basic happy path (no handling for Error results when reading)

No functionality yet for setting array formulae in code
@MarkBaker MarkBaker force-pushed the CalculationEngine-Array-Formulae-Initial-Work branch from b9a7aed to 8156ed9 Compare January 30, 2022 18:18
@MarkBaker MarkBaker force-pushed the CalculationEngine-Array-Formulae-Initial-Work branch from 6672dbc to 39a6c29 Compare January 30, 2022 20:41
MarkBaker added 4 commits January 31, 2022 18:25
… spillage cells when calculating the value

No provision yet for the single operator, or for handlng #SPILL! or #CALC! errors
…on is written and linked; and then tag array formula cells with the `cm` tag to link them to that cell metadata definition
@MarkBaker MarkBaker force-pushed the CalculationEngine-Array-Formulae-Initial-Work branch from 2793171 to d2435cd Compare February 1, 2022 21:34
@MarkBaker MarkBaker force-pushed the CalculationEngine-Array-Formulae-Initial-Work branch 2 times, most recently from d854d5b to 5b322f3 Compare February 3, 2022 23:07
@MarkBaker MarkBaker force-pushed the CalculationEngine-Array-Formulae-Initial-Work branch from 5b322f3 to 593a9f0 Compare February 4, 2022 09:18
@MarkBaker MarkBaker added this to the 2.0 milestone Feb 4, 2022
@MarkBaker MarkBaker force-pushed the CalculationEngine-Array-Formulae-Initial-Work branch from 593a9f0 to 3cec90d Compare February 4, 2022 10:30
Note that the deprecated Excel function implementation classes should be removed completely for PhpSpreadsheet 2.0.0; and the bc break that array formula handling entails will require this to be a 2.0.0 implementation... but just for the moment, this is a cleanup... those files will be deleted once we switch to development on a 2.0-dev branch, and I want to do a few more PR merges before then, and update this branch as part of the 2.0-dev changes
@MarkBaker MarkBaker added the writer/ods Writer for Open/LibreOffice spreadsheet files (OASIS) label Apr 2, 2022
MarkBaker added 22 commits April 12, 2022 08:58
# Conflicts:
#	phpstan-baseline.neon
#	src/PhpSpreadsheet/Worksheet/Worksheet.php
Start removing some of the deprecations, starting with the old Excel Function implementations.
… indicator that a method should be internal only
# Conflicts:
#	docs/references/function-list-by-category.md
#	docs/references/function-list-by-name.md
#	phpstan-baseline.neon
#	src/PhpSpreadsheet/Worksheet/Worksheet.php
# Conflicts:
#	phpstan-baseline.neon
# Conflicts:
#	phpstan-baseline.neon
#	src/PhpSpreadsheet/Calculation/Calculation.php
# Conflicts:
#	phpstan-baseline.neon
…Initial-Work

# Conflicts:
#	phpstan-baseline.neon
#	src/PhpSpreadsheet/Calculation/Calculation.php
#	src/PhpSpreadsheet/Calculation/Functions.php
#	src/PhpSpreadsheet/Calculation/MathTrig.php
…Initial-Work

# Conflicts:
#	phpstan-baseline.neon
@MarkBaker MarkBaker force-pushed the CalculationEngine-Array-Formulae-Initial-Work branch from 4c46566 to b1d1ce7 Compare May 28, 2022 12:18
MarkBaker added 4 commits June 18, 2022 13:00
# Conflicts:
#	phpstan-baseline.neon
…Initial-Work

# Conflicts:
#	phpstan-baseline.neon
#	tests/PhpSpreadsheetTests/Worksheet/WorksheetTest.php
@MarkBaker MarkBaker closed this Jul 2, 2022
@MarkBaker MarkBaker deleted the CalculationEngine-Array-Formulae-Initial-Work branch July 2, 2022 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE calculation engine reader/gnumeric Reader for Gnumeric spreadsheet files reader/ods Reader for Open/LibreOffice spreadsheet files (OASIS) reader/xlsx Reader for MS OfficeOpenXML-format (xlsx) spreadsheet files writer/ods Writer for Open/LibreOffice spreadsheet files (OASIS) writer/xlsx Writer for MS OfficeOpenXML-format (xlsx) spreadsheet files
Development

Successfully merging this pull request may close these issues.

2 participants