Implement shared and array formulas #647
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently cells with formulas like
<f t="array" ref="G1:G3">PI()</f>
or<f t="shared" ref="F2:F4" si="0">1+1</f>
will be lost during parsing. This PR adds partial support for these formula types. Based on this StackOverflow question it's not feasible to write documents using shared formulas as there are Excel-specific details. The best approach therefore is to convert shared formulas into normal formulas during parsing. Unfortunately, this means that the file won't be identical if it is read and then written, but it's better than losing the formulas entirely.Array formulas should be able to be supported fully but will require some storage in the worksheet and an interface for adding/reading/deleting them. For now they are also converted into normal formulas.
Addresses #639 and #436.