TopLeftCell Incorrect

Hello,

I have an Excel file where one of the Worksheets has Freeze Panes set to cell F37. When we run this report through a process and it’s saved with Aspose the Freeze Panes move to cell I65. It’s difficult to reproduce this issue and I’m unable to share the files that exhibit the behavior, however I was able to find some differences in the OpenXML spec that may be to blame.

In the source file the sheetView does not have a topLeftCell:

When I run the process locally, where I can’t reproduce the issue, the sheetView note now has a topLeftCell set to A1:

When the report is run in the customer’s environment where the issue is reproduced, the sheetView has a topLeftCell set to D29

In all 3 cases the pane node for the freeze panes remains accurate:

It seems there’s a condition, which I haven’t been able to reproduce where the topLeftCell is set to D29 (because the first 3 columns and 28 rows are hidden) and this setting throws off the Freeze Panes. I have been unable to find any API method or property which would correlate to setting topLeftCell in the OpenXML specification. Can you provide any input as to how this is set and if you see a situation where it’s being set incorrectly?

Thank You,
-Andy

@weissa
Please try Worksheet.FirstVisibleRow and FirstVisibleColumn to set topLeftCell.
But it’s better that you can provide some files or codes to reproduce this issue. Then we can check it soon.