Re: Query Excel

From: Steve Kass (skass_at_drew.edu)
Date: 08/03/04


Date: Tue, 03 Aug 2004 17:58:49 -0400

Mark,

  It looks to me like you've got some extra spaces, that's all. The
table it can't find is <space>Sheet1$<space>. You can also do this, I
think:

select * from OpenRowset('Microsoft.Jet.OLEDB.4.0', 'Excel
8.0;Database=e:\excel\NewFile.xls',Sheet1$)

Steve Kass
Drew University

Mark wrote:

>I am trying to query Excel data like this:
>SELECT *
>FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
> 'Data Source="c:\SupportRotation.xls";
> Extended properties=Excel 8.0')...[ Sheet1$ ]
>
>All I get is the folowing:
>erver: Msg 7314, Level 16, State 1, Line 1
>OLE DB provider 'Microsoft.Jet.OLEDB.4.0' does not contain
>table ' Sheet1$ '. The table either does not exist or the
>current user does not have permissions on that table.
>OLE DB error trace [Non-interface error: OLE DB provider
>does not contain the table:
>ProviderName='Microsoft.Jet.OLEDB.4.0', TableName=' Sheet1
>$ '].
>
>