v1.15.0
Features
-
Support for inheritance when using the source generator. By default, the source generator will only create columns from properties defined directly on the type passed to the
WorksheetRow
attribute. With the newInheritColumns
attribute, the base class will be taken into account as well. Here is an example:public class Vehicle { public int Wheels { get; set; } public bool HasEngine { get; set; } } [InheritColumns] public class Car : Vehicle { public string Make { get; set; } public string Model { get; set; } } [WorksheetRow(typeof(Car))] public partial class CarContext : WorksheetRowContext;
In this example, the columns will be created in this order:
Wheels
,HasEngine
,Make
,Model
. The order can be customized by settingDefaultColumnOrder
on theInheritColumns
attribute, or by using theColumnOrder
attribute directly on the properties. Thanks to @Ashymonth for the contribution! -
String cells can now be created from
ReadOnlyMemory<char>
in addition tostring
. New constructors have been added toCell
,StyledCell
, andDataCell
.
Performance improvements
- Most of the
DataCell
constructors are now branchless on .NET 8 and later. - Improved performance of creating
workbook.xml
(metadata file that is part of an XLSX file).