I can manually run the stored procedure, but when I create job in SQL Server Agent, it is not running, execution failure.
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0 xml;IMEX=2;HDR=YES;Database=C:\Excel\LanConnection.xlsx;',
'SELECT * FROM [Sheet1$]')*
Executed as user: NT SERVICE\SQLSERVERAGENT
.
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". [SQLSTATE 42000] (Error 7303)
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Unspecified error"
[SQLSTATE 01000] (Error 7412). The step failed.