I am trying to query a spreadsheet using VBA and am running up against a seeming hard limit of 65536 rows (though I am running Excel 2013).
When trying to select all
Older Excel versions (prior to 2007) indeed have a limit of some 65k+ rows per worksheet. Run your code and reference any object Lib starting w/Excel 2007 and up (max 1,048,576 rows per worksheet, Lib version correspondingly 12.x and up). Pertinent to your case, try to use a notation [Sheet1$A:A]
instead of [Sheet1$A1:A65537]
Rgds,
I encountered this problem a long time ago. What I did was writing my query like this:
select Data from [Temp$]
Where Temp was my sheet name, the content of cell A1 was "Data" and the content of A2:A80000 were ids
It worked.