QLearnerNow
Programmer
Hi guys,
I want to query an excel file using OPENDATASOURCE command from my Query Analyser. I want to do this without using a linked server.
OPENDATASOURCE seems to be the right command but when I give this command in query analyser
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\Finance\account.xls";User ID=;Password=;Extended properties=Excel 8.0')...[xactions$]
I get an error stating that the object does not exist
account.xls has an xactions worksheet.
I have tried without brackets and $ sign
the excel worksheet if from Excel2000 tho would this be a reason why this is happening?
If any one has any clues or can reconstruct this query for me please do.
I appreciate any help provided
Regards,
QLearnerNow
I want to query an excel file using OPENDATASOURCE command from my Query Analyser. I want to do this without using a linked server.
OPENDATASOURCE seems to be the right command but when I give this command in query analyser
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\Finance\account.xls";User ID=;Password=;Extended properties=Excel 8.0')...[xactions$]
I get an error stating that the object does not exist
account.xls has an xactions worksheet.
I have tried without brackets and $ sign
the excel worksheet if from Excel2000 tho would this be a reason why this is happening?
If any one has any clues or can reconstruct this query for me please do.
I appreciate any help provided
Regards,
QLearnerNow