Querying more than 65536 rows error in Excel 2013

前端 未结 2 872
北恋
北恋 2020-12-06 03:57

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

相关标签:
2条回答
  • 2020-12-06 04:01

    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,

    0 讨论(0)
  • 2020-12-06 04:04

    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.

    0 讨论(0)
提交回复
热议问题