NanoXLSX icon indicating copy to clipboard operation
NanoXLSX copied to clipboard

swapped min and max in GetLastDataColumnNumber() and GetFirstDataColumnNumber()

Open pokorny opened this issue 1 year ago • 4 comments
trafficstars

Bug description Functions GetLastDataColumnNumber() and GetFirstDataColumnNumber() has swapped Min and Max functions. It is necessary to fix the function GetBoundaryDataNumber(bool row, bool min, bool ignoreEmpty) in the Worksheet.cs file ln: 1324.

Steps To Reproduce Steps to reproduce the behavior:

  1. Create a workbook
  2. Create worksheet and fill values into A1,B1,C1
  3. Call worksheet.GetLastDataColumnNumber() and worksheet.GetFirstDataColumnNumber()

Expected behavior If you follow Steps to reproduce the behavior expected GetLastDataColumnNumber() return 3 and GetFirstColumnNumber() returns 0.

Environment (please complete the following information):

  • Windows 10
  • .NET Framework 4.7.2
  • 'en-US'
  • Version of NanoXLSX 2.3.0

pokorny avatar Feb 12 '24 15:02 pokorny

Hi, Thank you for the report and the PR. I'm sorry for the delay. I hope I can look into this as soon as possible.

rabanti-github avatar Feb 24 '24 01:02 rabanti-github

Looks good so far. I will do some code maintenance and the necessary work for an upcoming patch release

rabanti-github avatar Feb 24 '24 21:02 rabanti-github

The release v2.3.2 was created some minutes ago and the Nuget package should be available in some further minutes. Thank you again for the contribution. Pleas let me know if something is missing or not working as expected

rabanti-github avatar Feb 24 '24 21:02 rabanti-github

There was another bug discovered and v2.3.2 was superseded by v2.3.3 (v2.3.2 was deleted as release and unlisted as NuGet package)

rabanti-github avatar Feb 25 '24 00:02 rabanti-github

I will close this issue for now. Please don't hesitate to open a new one, if there are any issues with this fix or another part of the library. Thanks again for the contribution

rabanti-github avatar Apr 21 '24 21:04 rabanti-github