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

Free Support Forum - aspose.com

Unhide and ungroup rows and columns in MS Excel worksheet using C#.NET


I'm looking at the Cells.UnhideRow method and am wondering if there's a method available that unhides all of the rows, as well as methods for unhiding all columns.

The UnhideRow method that I see takes a single index for a single row, and then also wants the height. I need the method to at least just apply the auto fit to the height so I don't set arbitrary height values. I also would like a method that unhides every single used row.

Does a method like this exist?



Well, I am afraid, there is no such method available to unhide all the hidden rows and columns at once. Also, in MS Excel you need to unhide rows/columns one at a time, so the functionality is not available in MS Excel either. I think you may loop through all your desired rows and columns and make them unhide, you can also use Cells.Rows[row].IsHidden and Cells.Columns[column].IsHidden api to check if a row or column is hidden or not.

We will also check if we can enhance the method Cells.UnhideRow/UnHideColumn that should auto-expand to its original height/width without requiring the height/width parameter.

Anyways, we have added your request into our issue tracking system with an issue id:
CELLSNET-14150. We will look into the feasibility of your requested feature(s) and get back to you soon.

Thank you.

Ok. Yea, the height parameter is a little restricting, I imagine.

The Office Interop Excel API contains functionality to Hide and Unhide all rows at a time.

Could you please tell me how office Interop Excel API hide/unhide all rows at a time? I checked it and want to add an API similiar to it but didn't find it. We can add new UnhideRows/UnhideColumns method to serve your need.

From the thread topic, I think you want to ungroup rows and make the hidden rows visible. You can try Cells.UngroupRows method.