View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming, microsoft.public.dotnet.languages.csharp
My interest My interest is offline
external usenet poster
 
Posts: 14
Default efficient / easy way to convert an Excel.Range to a double[,]

Somewhat I remember I used to be able to do sth like the the following

double[,] values = (double[,])excel_range.Value2

But it seems to be not working any more, throwing an exception "cannot
convert System.Object[,] to System.Double[,]"

Of course, I can do iteration and, as a bottom line, using
Double.Parse(cell_value.ToString()). The question is there a more
efficient way to do the job?

I am using Office XP with PIA.

Thanks.