How to count rows or columns with data in a worksheet in Infragistics.Excel? For example, myWorkbook.Worksheets[0].Rows.Count
Thanks, but it can be tricky due to possibly very large file dimensions. If only it was calculated at runtime...
Will try to find a solution :)
You can just loop over a row's Cells collection with a foreach loop. This will give you all cells which have a value or a non-default cell format.
Yes, you're right with a columns, but there is a property for WorksheetRow named "HasCellBlocks", which also isn't accessible.
My problem is when cell is empty but, for example, resized. Then it exists in the Cells collection, but it's Value is null. These cells are often at the bounds, and what I need is to know when I find an empty row: this row is empty at the middle of data (count as error) or it is "end of the document". A property like "HasCellBlocks" could easily tell me if the row have any values.
This property is only initialized and used when saving a file, so it would not be useful at run-time. Also, it just indicates whether the column has a non-default width or a non-default cell format, so I don't think it would help you that much. What are you trying to do with the columns?
I just wonder why column's property "HasData" was made private :(