Free Support Forum - aspose.com

Determining if a row or column is hidden

I hope this is an easy answer for someone with a little more experience out there!

I am attempting to detrmine if a row or a column I have read in from an Excel document is hidden or not. The Cells object has the ability to hide or unhide columns and rows, but I can not find a “hidden” property.

Can anyone provide some sage-like advice?

-Dave

Please try the attached fix with the following code:

for(int i = 0; i < 10; i ++)
{
double height = cells.GetRowHeight(i);
if(height == 0.0)
{
//row is hidden. processing it here

}
}

for(int i = 0; i < 10; i ++)
{
double width = cells.GetColumnWidth(i);
if(width == 0.0)
{
//column is hidden. processing it here

}
}

Thank you for the response! Yes, I did try viewing the height, but the height of the hidden row or column as set to its “unhidden” value, even if it was hidden. Did you find this to be true as well?

I noticed you attached a dll to your response that was newer than the one I had (downloaded 8/20/2005). When I used the new dll, I was able to see that both hidden rows and columns had a size of 0.0. Thanks again for your help!
-Dave