取消
显示结果 
搜索替代 
您的意思是: 

Read Specific worksheet in Excel File

已解决!
转到解答

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.

0 项奖励
11 条消息(共 15 条)
1,847 次查看

ok, sorry bout that.

 

i don't understand the range method, what do you mean by range "A:IV"?

0 项奖励
12 条消息(共 15 条)
1,831 次查看

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

 

13 条消息(共 15 条)
1,825 次查看

ok, i get it now. like finally.

thanks alot!

0 项奖励
14 条消息(共 15 条)
1,814 次查看

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.

Best regards,
Krispiekream
0 项奖励
15 条消息(共 15 条)
1,627 次查看