Skip to content

Release v3.1.0

Choose a tag to compare

@rabanti-github rabanti-github released this 04 May 00:56
· 78 commits to master since this release

This is the release of the version v3.1.0

Changes

  • Package: NanoXLSX.Core
    • Breaking change: Worksheet.Cells now returns IReadOnlyDictionary<string, Cell> instead of Dictionary<string, Cell>. All read operations (["A1"], ContainsKey, TryGetValue, foreach, Count, Keys, Values) work unchanged. Mutating properties of an existing cell in-place (e.g. Cells["A1"].Value = x) continues to work. Adding or removing cells through Cells directly (e.g. Cells.Add(...), Cells.Remove(...), Cells["A1"] = new Cell(...)) is no longer possible; use Worksheet.AddCell(...) and Worksheet.RemoveCell(...) instead.
    • Replaced internal cell storage with an integer-keyed dictionary ((column, row)), eliminating per-cell address string allocation on every AddCell call and reducing memory overhead for large workbooks.
    • Added Worksheet.CellValues property (IEnumerable<Cell>): allocation-free enumeration over all cells, preferred for hot iteration paths.
  • Package: NanoXLSX.Reader
    • Improved reader performance (memory consumption, load time). Reading a workbook should now be up to 3 times faster.
  • Package: NanoXLSX.Writer
    • Optimized writer performance (memory consumption, save time)
    • Updated internal worksheet iteration to use Worksheet.CellValues, eliminating per-cell string allocation during save.
  • General
    • Added llms.txt to root directory of the repository, for better orientation of AI agents
    • Added hints for AI agent, pointing to llms.txt
    • Updated test projects from .Net 5.0 to .Net 8.0, Xunit 2.x to 3.x, and various test-relevant dependencies to the most recent versions.

Note: Direct manipulation of the cell dictionary through Worksheet.Cells (e.g. Cells.Add(...), Cells.Remove(...), Cells["A1"] = new Cell(...)) was never an intended or documented API. Doing so bypassed address validation, style normalization and internal bookkeeping performed by AddCell and RemoveCell, and could silently produce invalid workbooks. The change to IReadOnlyDictionary makes this boundary explicit.

Content