Skip to content
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

Reconcile function discrepancies between the documented lists, and the Calculation Engine #1585

Merged
merged 3 commits into from
Jul 25, 2020

Conversation

MarkBaker
Copy link
Member

@MarkBaker MarkBaker commented Jul 18, 2020

This is:

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

Checklist:

Why this change is needed?

Reconcile discrepancies between the documented lists of functions (by category and alphabetic), and the Calculation engine. Update them all to reflect the complete set of current standard Excel functions (including those introduced in "Office 365").

All existing Excel functions are now defined within the Calculation Engine code, even if tagged as "Not Yet Implemented". Where a new Excel function has replaced an older one, both are defined, and if this is simply an alias, then it is flagged as implemented if the old function had been implemented (e.g. CHISQ.DIST.RT() replacing CHIDIST()). If the replacement function has a different signature (e.g. LOGNORMDIST() has been replaced by LOGNORM.DIST(), but with a new optional argument), then the new function is treated as "Not Yet Implemented" until the change of functionality to handle the additional argument has been implemented. Completely new functions are simply flagged as "Not Yet Implemented".

In many cases, the new functions (or the behavioural changes) are easy to implement,but outside the scope of this PR

…th the Calculation engine. Update them all to reflect the complete set of Excel functions, and add an Excel version reference to the documentation lists
Copy link
Member

@PowerKiKi PowerKiKi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I just remembered that we now have ./bin/generate-document to generate the markdown from the PHP code. That means the new column Excel Version you introduce in this commit would be lost the next time we auto-generate the docs.

What should we do ? move the Excel version info int \PhpOffice\PhpSpreadsheet\Calculation\Calculation so it can be re-generated properly ? drop the column entirely ? or something else ?

@MarkBaker
Copy link
Member Author

I'd forgotten about the function list documentation builder.

I don't particularly want to add more information to the Calculation function array than is necessary for use in the engine itself - I know it's static, but that array is still heavy on memory - and version is only of minor use for the documentation, so I'll drop it... I was also thinking about adding a link to the official MS documentation for each function, glad that I didn't now.

@MarkBaker
Copy link
Member Author

Removed the version column from the md files; they'll rebuild anyway, but at least the Calculation class definitions are fully up-to-date for them to build from

@MarkBaker
Copy link
Member Author

And I'll look at other ways that we might provide additional information such as version and perhaps links to the MS function docs in future

@MarkBaker MarkBaker requested review from PowerKiKi July 19, 2020 10:49
@MarkBaker MarkBaker merged commit e084e89 into master Jul 25, 2020
@MarkBaker MarkBaker deleted the Documentation-Update-Lists-of-Functions branch July 25, 2020 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants