title: error while executing excel file in sql server 2008
body: <p>I have tried the following query in a SQL query</p>
  
  <pre><code>SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=c:\generalholiday.xls','select * from [sheet1$]')
  </code></pre>
  
  <p>The following error is happened:</p>
  
  <blockquote>
    <p>OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"
    returned message "The Microsoft Access database engine could not find
    the object 'sheet1$'. Make sure the object exists and that you spell
    its name and the path name correctly. If 'sheet1$' is not a local
    object, check your network connection or contact the server
    administrator.". Msg 7350, Level 16, State 2, Line 1 Cannot get the
    column information from OLE DB provider "Microsoft.ACE.OLEDB.12.0" for
    linked server "(null)".</p>
  </blockquote>
  
  <p>Actually I searched lot of answered based on this queries. But I did not get reliable result for me. </p>
  
  <p>What I have done so far,</p>
  
  <p>I installed access database engine 64 bit, and run the following queries</p>
  
  <pre><code>EXEC sp_configure 'show advanced options', 1
  RECONFIGURE
  GO
  EXEC sp_configure 'ad hoc distributed queries', 1
  RECONFIGURE
  GO
  
  EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1 
  GO 
  EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1 
  GO 
  </code></pre>
  
  <p>but still the above error is occurred. it is headache for me a full day to find this solution. </p>
  
  <p>Please give me solution for this problem.</p>
  
  <p>I am using SQL Server 2008 (64 bit) and MS Office 32 bit</p>