ExcelNumberFormat icon indicating copy to clipboard operation
ExcelNumberFormat copied to clipboard

Regression 1.0.10 to 1.1.0 - additional parameter breaking public function signature...

Open Pitterling opened this issue 4 years ago • 10 comments

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

Pitterling avatar Jan 12 '21 20:01 Pitterling

Hi,

Thanks for the report. Indeed, the change is source compatible, but apparently not binary compatible. Makes sense to reintroduce the original function signature!

andersnm avatar Jan 12 '21 20:01 andersnm

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

andersnm avatar Jun 30 '21 12:06 andersnm

Should I submit a PR to revert this regression?

igitur avatar Jun 30 '21 12:06 igitur

@igitur That would certainly help resolving the issue.

andersnm avatar Jun 30 '21 12:06 andersnm

Alternatively, we'll hopefully be releasing ClosedXML v0.96 soon. I could then just make ExcelNumberFormat v1.1.0 the minimum version required.

igitur avatar Jun 30 '21 12:06 igitur

It would be nice to see a resolution on this issue. I'm not sure if ClosedXML x0.96 is still forthcoming or not.

hammond13 avatar Feb 10 '22 16:02 hammond13

So~how's going now?

ahdung avatar Feb 11 '22 00:02 ahdung

I apologize for not getting around to fixing this. I hope to focus on this project again one day, alas no estimates for when

andersnm avatar Feb 23 '22 15:02 andersnm

I hope https://github.com/ClosedXML/ClosedXML/pull/1807 will reduce the number of requests for this.

igitur avatar Jun 08 '22 15:06 igitur

To all, please upgrade ClosedXML to v0.96.

igitur avatar Jun 30 '22 13:06 igitur