dugdugdug's blog

Reading large data into Excel using arrays or otherwise

Can someone please give me some pointers with regard to working with large data (say 1 million rows, 200 columns) in Excel 2010?

Having the data on the worksheet from cell A1 onwards, I am trying to read it in memory via an array.

QUESTION 1. What is the difference between these two methods?

Method 1:

dim myarray()
myarray = cells(1,1).currentregion.value

Method 2:

dim myarray
myarray = cells(1,1).currentregion

The second method seems to be able to read "more data" than the first, though both fail if the data is "too big", with an out of memory message.

Syndicate content