We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Columns are not widening properly while using WorkSheet.autoFitColumns() in Java

I’ve got a column with custom format for a date.
When applying autoFitColumns on the sheet, the column is not widened properly.

To reproduce, please try the following code with attached sample.

Workbook workbook = new Workbook(“BeforeAutoFit.xlsx”);
Worksheet sheet = workbook.getWorksheets().get(0);

Using ASPose.Cells java 8.8.0 .


Thanks for your posting and using Aspose.Cells.

Your excel file does not look sound which might be causing this problem. We have tested it with the latest version:
Aspose.Cells for Java v8.8.0.2
and found the issue persists.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-41838 - Columns are not widening properly while autofitting columns

I’m awaiting this fix eagerly because if column auto-sizing does not work, PDF becomes useless (Dashes only in PDF output with no possibility to see the data).


Well, since we just logged (2/3 hours before) your issue into our database, so the ticket is pending for analysis. Could you spare us a little time (3-5 days or so), the concerned developer from product team will evaluate your issue and try to figure it out soon. Generally if an issue is not complex, it should be fixed within a week. It might take a couple of weeks or more if the issue is complex. Hopefully, your issue would not be complex to sort it out soon.

Once we fix the issue, we will share the fixed version here.

Thank you.


Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSJAVA-41838 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

And before we provide a fix, there is a temp
solution of setting the view type as Normal.

Please see the following code.


Workbook workbook = new Workbook(“BeforeAutoFit.xlsx”);
Worksheet sheet = workbook.getWorksheets().get(0);
int oViewType = sheet.getViewType();

Thanks for the quick fix.
Thanks for the work-around.


Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the workaround. Hopefully, fix will be available by tomorrow too. Let us know if you encounter any other issue, we will be glad to look into it and help you further.

The issues you have found earlier (filed as CELLSJAVA-41838) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.