Skip to content

Release v4.0.0

Latest

Choose a tag to compare

@rabanti-github rabanti-github released this 01 Mar 01:41
· 1 commit to master since this release

This is the major release of the version v4.0.0

Changes

Modularization

  • Changed the code base of PicoXLSX to the now shared NanoXLSX base (namespace changed)
  • Split the monolithic PicoXLSX library into separate NuGet packages: NanoXLSX.Core, NanoXLSX.Writer and the meta-package PicoXLSX
  • Option to upgrade PicoXLSX to NanoXLSX (reader support) by adding the NuGet package NanoXLSX.Reader
  • Introduced a plugin architecture for the Writer module, allowing custom implementations
  • Added external module NanoXLSX.Formatting for in-line cell formatting (rich text), bundled with the meta-package

Color System

  • Introduced new Color class (namespace NanoXLSX.Colors) supporting RGB, ARGB, indexed, theme, system and auto colors
  • Changed Font.ColorValue from string to Color
  • Removed Font.ColorTheme property (value now handled by Font.ColorValue when type is ThemeColor)
  • Changed Fill.BackgroundColor and Fill.ForegroundColor from string to Color
  • Removed Fill.IndexedColor property (value now part of Color class)
  • Added implicit conversions for colors from strings (ARGB) and integers (indexed color)

Font Redesign

  • Changed Font.Family from string to enum Font.FontFamilyValue
  • Changed Font.Charset from string to enum Font.CharsetValue
  • Changed Font.VerticalAlign from Font.VerticalAlignValue to Font.VerticalTextAlignValue
  • Added Baseline as value for VerticalTextAlignValue
  • Added font properties: Font.Outline, Font.Shadow, Font.Condense and Font.Extend
  • Renamed font constants to PascalCase (e.g. DEFAULT_FONT_NAME to DefaultFontName)

Fill Redesign

  • Complete overhaul of the Fill class for flexible color definitions including tint support
  • Changed fill color properties to use the new Color class
  • Added implicit operators for Fill creation from strings and integers
  • Renamed fill constants and enum values to PascalCase

Worksheet and Workbook

  • Worksheet.SelectedCells changed from Range to List<Range> with automatic range recalculation
  • Worksheet.SheetProtectionPassword changed from string to IPassword interface (default: LegacyPassword)
  • Address struct properties (Row, Column, Type) are now read-only (immutable)
  • Range struct properties (StartAddress, EndAddress) are now read-only (immutable)
  • Added explicit cast operator for Address from string and implicit cast operator for Range from string
  • Added AddCellRange overloads accepting Range objects
  • Removed deprecated methods: Workbook.AddStyle, Workbook.AddStyleComponent, Workbook.RemoveStyle
  • Workbook.GetMruColors() now returns IReadOnlyList<Color>
  • Empty Workbook.WorkbookMetadata now returns a default object instead of null

Naming Conventions (Breaking)

  • All enum values renamed from camelCase to PascalCase across: Cell.CellType, Worksheet.SheetProtectionValue, Worksheet.WorksheetPane, Worksheet.SheetViewType, Border.StyleValue, Fill.FillType, Fill.PatternValue, CellXf.HorizontalAlignValue, CellXf.TextBreakValue, CellXf.TextDirectionValue, CellXf.VerticalAlignValue, NumberFormat.FormatRange, NumberFormat.FormatNumber, Font.SchemeValue, Font.VerticalTextAlignValue, Font.UnderlineValue
  • All public constants renamed from UPPER_SNAKE_CASE to PascalCase across Worksheet, Font, Border, Fill, CellXf, NumberFormat

Utils

  • Several util methods split into specific classes DataUtils, ParserUtils and Validators in namespace NanoXLSX.Utils
  • Utils.GeneratePasswordHash moved to LegacyPassword.GenerateLegacyPasswordHash
  • Constants moved to NanoXLSX.Utils.Constants

Misc

  • Introduced Theme class for workbook theme representation
  • All (s)RGB values are automatically validated and cast to uppercase
  • Improved Cell constructor behavior: EMPTY type discards any passed value
  • Added ThemeColor constructor by index
  • Various bug fixes and optimizations from RC releases

See the Migration Guide for detailed instructions on migrating from v3.x to v4.0.0.

Content