Unable to query named range on sheet with spaces in name in Excel

前端 未结 5 1495
我寻月下人不归
我寻月下人不归 2021-01-18 14:21

I have a workbook with multiple sheets, and each sheet has the same set of named ranges (IE they are scoped to the sheet, not workbook).

I want to query based on a n

5条回答
  •  余生分开走
    2021-01-18 15:01

    I was having this same issue and was able to solve without a named range. In addition, as a two-fold part of what my issue was, make sure there are no trailing spaces in the worksheet name. Try...

    strQuery = "Select * from ['With Spaces$']"
    

提交回复
热议问题