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

Bump ClosedXML from 0.101.0 to 0.102.0 #24

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 25, 2023

Bumps ClosedXML from 0.101.0 to 0.102.0.

Release notes

Sourced from ClosedXML's releases.

0.102.0

Breaking changes

Please read migration guide from 0.101 to 0.102. The key ones changes are:

  • IXLCell is now a proxy to a sparse array and a new proxy is created each time it is requested by user code. Object.ReferenceEquals(ws.Cell("A1"), ws.Cell("A1")) now evaluates to false (used to be true)
  • IXLWorksheet AddWorksheet(DataTable dataTable) and IXLWorksheet AddWorksheet(DataTable dataTable, string sheetName) now use different name for the created table.

Significant changes

Replaced cell storage engine (#1969)

The cells in a workbook used to be stored in a Dictionary<int, Dictionary<XLCell>>. That has several significant drawbacks and the storage has been replaced with a sparse arrays of individual slices (basically a sparse array containing a specific part of a cell).

slices

Key benefits (in long term):

  • Decrease in memory consumption - sparse arrays don't use values that aren't use, from esoteric OLAP cube id to styles.
  • Bulk operations - there was pretty much no way to optimize bulk operations. Clear - go through each cell. With sparse arrays, ClosedXML can operate on pices of an array (e.g. preallocate for large inserts, clear an area).
  • Most operations use only data from a slice (e.g. setting a formula doesn't have to check all cells, only those that contain formula). Due to nature of sparse array of a slice, I only need to go through cells that contains actually useful content.
  • Easier insertion/deletion of rows. XLCell originally contain an address and when a row was inserted, I had to go though all cells and fix address (+ 20 other things).

Other than memory, it's a potential for the future. Replacing a storage engine is not simple and pretty much everything uses XLCell adapter.

An example of different for 500k rows of value only cells (gist). About 200MB vs 900MB. image image

Embedded fonts (#2106)

Default graphic engine of ClosedXML now contains an embedded font. That should be a quality of life improvement for users on Linux and other non-Windows environment who encountered

Unable to find font font name or fallback font fallback font name. Install missing fonts or specify a different fallback font through ‘LoadOptions.DefaultGraphicEngine = new DefaultGraphicEngine(“Fallback font name”)’..

The embedded font is an absolute bare bones Carlito font (though with a different name to avoid collision with the real one).

See doc for workflow of font selection: https://closedxml.readthedocs.io/en/latest/features/graphic-engine.html#fallback-and-embedded-font

Array formulas

A basic support for array formulas has been added. You can create array formula through IXLRangeBase object. csharp ws.Range("B2:D3").FormulaArrayA1 = "B1:D1*POWER(1+A2:A3, 2)"; image

For more info, see doc: https://closedxml.readthedocs.io/en/latest/features/formulas.html#array-formulas

Refactored pivot source (#1238)

The ancient PR from 2019 has been finally fixed and merged. It doesn't really add very useful features (multiple pivot tables don't have to have individual data store files in a xlsx file), but it is a big step to represent pivot cache data in a workbook. That is pretty much required to do anything useful with pivot tables.

... (truncated)

Commits
  • c3c8529 Bump version to 0.102.
  • 93492e8 Improve migration documentation from 0.101 to 0.102 about breaking changes.
  • 469d166 Fix incorrect documentation about a name of an inserted table for `IXLWorkboo...
  • 8f4f7bf #2080 When a worksheet contained a drawing (e.g. shape), it accessed workshee...
  • ad7e5b2 #1969 Replace the dictionary XLCell storage in XLCellsCollection with a spars...
  • c8336c6 Add ability to set table name when adding a worksheet with datatable - Fixes ...
  • f95d4bf Review and rework pivot cache API, refactor and document pivot caches.
  • 18b9a54 Consolidate and refactor pivot sources
  • c6acc61 #2066 Embedd an ultimate fallback font directly into the assembly. Due to fra...
  • b2d21fb Update version to 0.102-rc for next release.
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ClosedXML](https://github.com/ClosedXML/ClosedXML) from 0.101.0 to 0.102.0.
- [Release notes](https://github.com/ClosedXML/ClosedXML/releases)
- [Commits](ClosedXML/ClosedXML@0.101.0...0.102.0)

---
updated-dependencies:
- dependency-name: ClosedXML
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot requested a review from MareMare as a code owner June 25, 2023 20:00
@dependabot dependabot bot added the dependencies dependabot label Jun 25, 2023
@MareMare MareMare merged commit 7b6468d into main Jun 30, 2023
@MareMare MareMare deleted the dependabot/nuget/main/ClosedXML-0.102.0 branch June 30, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies dependabot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant