-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
I often had it that the custom Format did not get applied to ClosedXML.Report outputs and I always had to manually enter cells for them to apply. Even default Date Formats were not applied unitl you entered the Cell. I made a Sample which shows the behaviour in ClosedXML.Report 0.2.12-rc, (also behaved the same in old 0.2.2). I only have one Template where I got it working without manually doing so, but I was not able to replicate it.
// FormattingTest
// Bug Date Format not working: [$-de-DE]TTT, TT
var table5 = new List<FormattingTestEntry>
{
new("TestName6", new DateOnly(2025, 3, 23)),
new("TestName7", new DateOnly(2025, 3, 24)),
new("TestName8", new DateOnly(2025, 3, 25)),
new("TestName9", new DateOnly(2025, 3, 26))
};
template.AddVariable("FormattingTest", table5);
template.Generate();
template.SaveAs(outputFile);
private record FormattingTestEntry(
string Name,
DateOnly Date
);
Metadata
Metadata
Assignees
Labels
No labels