Read data from Excel.Range: undefined Value!

Hi, C# Gurus,

I have a problem reading data from Excel.Range. Here is how I did:

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

The problem is some elements in saRet are "undefined values"

I noted that the reason is that those corresponding cell contain formula not values directly.

Does any one know how to get around it?

Thanks.
[425 byte] By [caperover2002] at [2007-11-19 14:35:42]
# 1 Re: Read data from Excel.Range: undefined Value!
get_Value() returns value of the formula cells(after applying the formula).

Only time you will see "undefined value" is when the cell does not contain any value (empty cells).
poochi at 2007-11-9 1:53:05 >
# 2 Re: Read data from Excel.Range: undefined Value!
Hey,poochi, thanks a lot.

That is possible. Now it works after I copy/paste the cells.
caperover2002 at 2007-11-9 1:54:10 >