Openrowset doesn't execute in SQL Server

376 Views Asked by At

I am trying to take data from an Excel sheet and store it into SQL Server 2019 through the Openrowset statement. First I asked to enable 'ad hoc distributed queries' and 'show Advanced Options', which I did, but still alleged to execute it gets stuck and not is not providing the desired result. I'm doing this on my local computer.

Example query:

SELECT * 
FROM OPENROWSET ('Microsoft.ACE.OLEDB.12.0',
                 'Excel 12.0;Database=C:\Users\Public\Documents\Prueba.xlsx',
                 'Select * from [Hoja1$]')

AND it is a small Excel file, just a test, 10 rows, no more, I'm doing this on my local computer, I've done it before in my job computer and it works, but not here.

0

There are 0 best solutions below