worksheet.getCells().getMaxDisplayRange() often incorrect in Java

Are you aware that in many cases the Java version of Aspose Cells include blank columns on the
right of the actual display range?

While the equivalent C# worksheet.Cells.MaxDisplayRange works correctly.

Are you guys aware of any work-around to sift through long empty columns and determine that they are all


I have tried to reproduce this issue using blank workbooks but could not observe any problem. Please share your sample file and code snippet with us for our testing. We will reproduce the problem and provide our feedback after analysis.

The first sheet of this file

has a correct display range (2 columns) in C#, but (26 columns) in JAVA


I have tried this scenario using Aspose.Cells for Java, .NET and Interop as well using sample “invisible_text.xlsx” file. In all the cases I get 26 columns. Could you please test this issue using latest version Aspose.Cells for Java 19.2.x and share your feedback? If still issue is there, please share exact code which you are using along with the snapshots showing the wrong number of columns in this sample file. We will review the information and provide assistance accordingly.
Comparison.png (12.0 KB)

Are you looking at MaxDisplayRange?
Your screen shot does not show the value for that

I am using cells 19.1

The C# code is just worksheet.Cells.MaxDisplayRange

String localFilename = @“C:\tmp\invisible.xlsx”;
Workbook workbook = new Workbook(localFilename);

outputs (correctly)


in Java (the equivalent)
outputs (incorrectly)



I have again verified it using latest version 19.2.7 and got the same result in both .NET and Java as shown in the attached image. At my end version 19.1.x is also giving same results. You may please reconfirm the version and display it using CellsHelper.GetVersion() function for your reference.
Comparison2.png (20.9 KB)

You are correct … I sent you the wrong file, let me look for a repro file that does not have PII

Thank you for providing the feedback. Feel free to write us back if you have any other query in this regard.