I am using the below sql command to import an excel file (created in excel 2016) into SQL Server Management Studio on a 64bit Machine with 32 Bit Office.
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;
Database=C:\File1.xlsx', 'SELECT * FROM [Sheet1$]');
But I am getting the following error:
Msg 7403, Level 16, State 1, Line 1 The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.
I tried downloading 2007 Office System Driver: Data Connectivity Components but it didn't help.
Is it better to upgrade to 64 Bit Office? I only want part of the excel document to upload directly into a sql table. I can do the whole table via import but want to do it with VB or a Macro..