I'm trying to select data from Excel using OLE DB, but the other sheet names in the provided file has special characters.
For example: Sample_Sheet - #1
How do I go about this?
I tried
SELECT *
FROM [Sample_Sheet - #1$]
and it displays the data.
However, when I specify a range in the query:
SELECT *
FROM [Sample_Sheet - #1$D7:G22]
OLE DB throws an error
Microsoft Access database engine could not find the object
Any insights will be appreciated. Thank you!
1条答案
按热度按时间bhmjp9jg1#
Your
SELECT
statement looks very dubious.Here is how it is usually done in SSMS: