From: shatol on
Hi All!

I've a code on C# that reads the data from Excel's spreadsheet.
I use Excel.Worksheet.get_Range method to get a Excel.Range object like this:

Excel.Range range = Worksheet.get_Range("A1", Missing.Value);

After I got the range I read the data into a multi-dimensional array as
following:

Object[,] saRet;
saRet = (System.Object[,])range.get_Value(Missing.Value);

Everything works fine until I want to get only visible cells from the
spreadsheet. So I use the code:

range = range.SpecialCells(xlCellTypeVisible, Missing.Value);

When I try to invoke the range.get_Value(Missing.Value) method I got an
exception that states it cannot cast a string to Object[,].

So, I'm confused about what SpecialCells(xlCellTypeVisible) returns.
Could anyone provide me a hint how to get only visible range from the
spreadsheet?