Bump ClosedXML from 0.95.4 to 0.105.0 #14
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.
Updated ClosedXML from 0.95.4 to 0.105.0.
Release notes
Sourced from ClosedXML's releases.
0.105.0
What's Changed
Major enhancements
Automatic fixer of function names
Correct name for newer functions (post 2013) is not what is seen in the GUI (e.g. correct name for
CONCATis_xlfn.CONCAT). That is rather obscure fact not known to most developers. The formula setters (e.g.IXLCell.FormulaA1) now automatically fix function names, so it is stored correctly in the file.Pre-0.105


0.105
Sorting updates references
In many cases, the sorted area has a column with references. The formula often references another row. Pre-0.105, the references in the formulas weren't updated correctly.

Reimplementation/refactoring of old function infrastructure
Basically all implemented functions should be more faithful to how Excel behaves and evaluation of functions should be faster. implemented functions should be "complete" in sense that they correctly work for various arguments (e.g. various forms of
ROMANor pattern search inSUMIFS).The functions (before refactoring) had serious problems with ranges, errors or type coercion or structured references. The original parser back then didn't even parse literal arrays (
{1,2,3;4,5,6}). Parser and other things were updated, but because there was ~180 functions, original implementation was kept and functions were functions were reused through an adapter. Except the adapter never worked right and there were some other serious problems.Changes
Bugfixes
... (truncated)
0.105.0-rc
What's Changed
Major enhancements
Automatic fixer of function names
Correct name for newer functions (post 2013) is not what is seen in the GUI (e.g. correct name for
CONCATis_xlfn.CONCAT). That is rather obscure fact not known to most developers. The formula setters (e.g.IXLCell.FormulaA1) now automatically fix function names, so it is stored correctly in the file.Pre-0.105


0.105
Sorting updates references
In many cases, the sorted area has a column with references. The formula often references another row. Pre-0.105, the references in the formulas weren't updated correctly.

Reimplementation/refactoring of old function infrastructure
Basically all implemented functions should be more faithful to how Excel behaves and evaluation of functions should be faster. implemented functions should be "complete" in sense that they correctly work for various arguments (e.g. various forms of
ROMANor pattern search inSUMIFS).The functions (before refactoring) had serious problems with ranges, errors or type coercion or structured references. The original parser back then didn't even parse literal arrays (
{1,2,3;4,5,6}). Parser and other things were updated, but because there was ~180 functions, original implementation was kept and functions were functions were reused through an adapter. Except the adapter never worked right and there were some other serious problems.Changes
Bugfixes
... (truncated)
0.104.2
What's Changed
Full Changelog: ClosedXML/ClosedXML@0.104.1...0.104.2
0.104.1
Release notes from 0.102.1 to the 0.104.1.
Summary of breaking changes is available at docs.closedxml.io:
OpenXML SDK
OpenXML SDK has released version 3. The 0.104.0 uses it as a dependency.
XLParser replaced with ClosedParser
The XLParser has been replaced with ClosedParser. The key benefits are
There is also a visualizer to display AST in a browser at https://parser.closedxml.io
Formula Calculation
In previous version, formulas used to be calculated recursively. Each formula checked it's supporting cells for other formulas and if there were some, they were recursively evaluated. There was some logic to decrease number of evaluations. That works for a very simple cases, but isn't very good for various non-happy paths (i.e. cells weren't calculated when they should be).
This version has replaced it with a standard
For more info, see docs, the Microsoft has a page about principles Excel Recalculation
and there is one with API at docs.closedxml.io.
Structured references
New parser also allows a basic evaluation of structured references. Format of structured reference must use official grammar, not Excel friendly names (e.g.
Pastry[@Name]is user-friendly name forPastry[[#This Row],[Name]]). It's now possible to// Only int and double were inserted as numbers, now all types are
cell.InsertData(new object[] { (sbyte)1, (byte)2, (short)3, (ushort)4, (uint)6, (long)7, (ulong)8, 15f, 17m });
Use XLParser to parse formulas
ClosedXML has used a handcrafted parser for a while. The parse could parse a simple formulas, but a lot of features were out of its grasp (e.g. arrays, references to other worksheets, operations on references and so much more). We have replaced the original the original parser with the XLParser to facilitate a more powerful formulas.
You can try the parsing yourself on an online demo page: https://xlparser.perfectxl.nl/demo/
Through slower than the original parser, we are working with upstream to improve performance (spreadsheetlab/XLParser#163, spreadsheetlab/XLParser#161). Not-so-close future of CalcEngine is also multi threaded.
CalcEngine redesign
CalcEngine has been half-rewritten. It can now correctly represent all Excel types (e.g. Error is now a value, not an an exception) and perform operations on them (e.g. reference unions, comparisons work as they should).
As an example, SUM of two areas that overlap should count overlapping cells twice, thus the result should be 12, not 9.
A major change has been implicit intersections in the semantic of 2019 excel (Excel 2021 and 365 already support dynamic array formulas):