select * -- into #SomeTable from openrowset ( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\SomeFolder\SomeFile.xls', [SheetName$] );If you have Excel 2007 then the driver should be Microsoft.ACE.OLEDB.12.0, so the openrowset becomes:
select * -- into #SomeTable from openrowset ( 'Microsoft.ACE.OLEDB.12.0', 'Data Source=C:\SomeFolder\SomeFile.xls; Extended Properties="Excel 12.0" ', [SheetName$] );From what I understand, if you have 64-bit SQL Server then both SSMS and openrowset are error prone.
No one has followed this question yet.