I've tried a few different ways to load data from Excel into SQL Server, as shown here:
Use [TestDatabase]
SELECT *
INTO dbo.tbl_SST_Personnel
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0 Xml;HDR=YES;Database=C:\Users\rshuell001\Desktop\DATA - INPUT FILES\STT_Personnel.xlsx',
'SELECT * FROM [tbl_SST_Personnel]')
GO
insert into OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\Users\rshuell001\Desktop\DATA - INPUT FILES\STT_Personnel.xlsx;', 'SELECT * FROM [tbl_SST_Personnel]')
select * from tbl_SST_Personnel
Insert into tbl_SST_Personnel
Select *
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\Users\rshuell001\Desktop\DATA - INPUT FILES\STT_Personnel.xlsx;HDR=YES', 'SELECT * FROM [tbl_SST_Personnel]')
I keep getting this error message for the first 2 scripts.
Msg 7438, Level 16, State 1, Line 13
The 32-bit OLE DB provider "Microsoft.ACE.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server.
The 3rd script throws this error:
Msg 7302, Level 16, State 1, Line 14
Cannot create an instance of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".
Any idea how I can get this working?
Thanks to all.