I’ve identified a bug in Aspose.Cells which is easily replicable. This bug is present in the latest stable release version 24.5.0.
Bug description:
When creating an Excel file with Aspose.Cells, the vertical scrollbar on the file is scrollable all the way to the maximum row count in Excel, instead of only being scrollable to the end of the data. This bug automatically fixes itself after the first time the scrollbar is touched.
Bug trigger:
This bug is triggered when the row height of the first row is increased above the default of 15px.
I’ve attached C# code that can be used to replicate the bug as well as a video recording of the behavior described. The code generates 2 files which are exactly the same except the second file has the row height of the first row increased to 45px. When opening these files, the second file will always exhibit this behavior while the first file does not.
scrollbar bug.zip (3.4 MB)
@psweeney
By testing the sample code on the latest version v24.5, we can reproduce the issue. It was found that the scrolling range of the scrollbar significantly exceeded the maximum data row.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-55758
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@psweeney
It’s a strange issue. It seems that MS Excel gets the wrong height of total data rows if row height is automatic.
Please set default row height is custom as the following now:
file2.Worksheets[0].Cells.IsDefaultRowHeightMatched = false;
Adding this line of code fixed the behavior, thanks!
It is a strange issue and I’m not sure if it’s a bug in Aspose.Cells or Excel itself but thanks for providing this solution.
@psweeney
I am glad that your issue has been resolved by adding suggested code. If you have any questions, please feel free to contact us at any time.