Issue in querying the Reporting Services exported Excel

R

Raj

I exported a Reporting Services report into excel and trying to query the
excel as described below:
objRecordset.Open "Select * FROM [TestReportSheet$]", _
objConnection, adOpenStatic, adLockOptimistic, adCmdText

objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=F:\MyExcel.xls;" & _
"Extended Properties=""Excel 8.0;HDR=Yes;"";"

This returns zero rows even though there are 500 rows.

But if I copy the same data into different spreadsheet and try the above
code it works fine.

Is there anything that I am doing wrong in the first case?

Thanks in advance for any suggestions and help. I am posting this in
reporting services forum also.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top