Because you can't convert the variant that represents a "sheet" to a 2-D array.
Why don't you try what I told you? Use the range method like it worked before, but use the range "A:IV". It will give you a big 65536 by 256 element 2-D array. You'll have to figure out on your own how much of that is real data.
I don't know where you get your data from, but it might be a good idea for that spreadsheet to put a value in cell A1 that tells how much real data there is. Then you can read A1, get the size of the array. Then use that information to determine the range to read.
That means column A to column IV. When you don't specify a row number, it returns all rows for that column. You could also enter 1:65536 which will return the entire row for all the rows on the spreadsheet.
To be extra sure you understand, create a string constant with the contents A:IV and wire it to the Cell1 input of the Range method
can u show me the final results. i am trying to read from an excel file too but it didnt seems to work.
i need to collect all the data into an array.