ExcelNumberFormat
ExcelNumberFormat copied to clipboard
Regression 1.0.10 to 1.1.0 - additional parameter breaking public function signature...
Hi
i'm using ClosedXML in one of my projects and replaced only this library and got this exception
Method not found 'System.String ExcelNumberFormat.NumberFormat.Format(System.Object, System.Globalization.CultureInfo)'
StackTrace: at ClosedXML.Extensions.FormatExtensions.ToExcelFormat(Object o, String format) at ClosedXML.Excel.XLCell.GetFormattedString() ...
Looks like you changed the function signature and do not provide the original function any longer ??
1.0.10 public string Format(object value, CultureInfo culture) 1.1.0 public string Format(object value, CultureInfo culture, bool isDate1904 = false)
Better would be to provide the original public function as well ??
Thanks Peter
Hi,
Thanks for the report. Indeed, the change is source compatible, but apparently not binary compatible. Makes sense to reintroduce the original function signature!
Adding this report from "Alan" via nuget.org's "Contact Package Owners" feature:
Upgraded ClosedXML from 0.95.3 to 0.95.4 Upgraded DocumentFormat.OpenXml from 2.7.2 to 2.13.0 Upgraded ExcelNumberFormat from 1.0.10 to 1.1.0
Using _Worksheet.Columns().AdjustToContents() caused runtime to take 10+ times longer and some columns were not properly sized, particularly with wrapped headers (i.e., imbedded CrLf)
Reverted just ExcelNumberFormat back to 1.0.10 and issues were resolved
Thanks
Should I submit a PR to revert this regression?
@igitur That would certainly help resolving the issue.
Alternatively, we'll hopefully be releasing ClosedXML v0.96 soon. I could then just make ExcelNumberFormat v1.1.0 the minimum version required.
It would be nice to see a resolution on this issue. I'm not sure if ClosedXML x0.96 is still forthcoming or not.
So~how's going now?
I apologize for not getting around to fixing this. I hope to focus on this project again one day, alas no estimates for when
I hope https://github.com/ClosedXML/ClosedXML/pull/1807 will reduce the number of requests for this.
To all, please upgrade ClosedXML to v0.96.