2
Reply

Reading from Excel (Range into multidimensional Array)

Houman

Houman

May 26 2009 8:16 AM
10.8k

Hello,

How would I read from an Excel sheet and load the marked selection (Area) into an multidimensional array?  A column in Excel could itself be a multi dimensional array since it would contain more than just one value.

The idea (not sure how good or bad this is) is right now is to do a for loop through all the Excel.Area (selected fields) and add the content of that field to the multi dimensional array. Since the multi dimensional array is of type object[,] and therefore non-generic there is no convenient add() method to it. All of it needs to be done manually.

Any idea if this approach is ok or if it could be done more efficientlty?

Many Thanks,
Houman

 


Answers (2)