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

Free Support Forum - aspose.com

Collapse its not working in case of Sheet.AutoFitColumns()


In my excel sheet i had apply grouping fro certain column for expand and collapse.i had save the excel doc with collapse Group.And i had apply the AutoFitColumns() for all columns in excel.but after save the excel sheet group its is in expanded mode.


Can you please look in to it.


Could you try the following code segment (where you are applying auto-fit columns) instead:
Sample code:

AutoFitterOptions options = new AutoFitterOptions();
            options.IgnoreHidden = true;

Let us know if you still find the issue.

Hi @Amjad_Sahi

You code is working but when I combine the generated workbook.
using Workbook wb = new Workbook();
wb.Combine() method and save it at that time my group is again expand instead of collapse.
you above code is not working in this case.

Can you please look in to it.



Please create a simple console demo application (runnable), zip it and post us here with all the files, you may upload to some free file sharing service (e.g Dropbox, Google drive, etc.) and share the Download link here, we will check it soon.

Thank you.