Q: Opening Data from Excel in SQL Server I am trying to select some data from Excel into my SQL query.
I have the following query:
SELECT*
FROM
openrowset('Microsoft.ACE.OLEDB.12.0',
            'Excel 12.0;Database=S:\Nh\NHData.xlsx;',
            'SELECT *
             FROM [Pre Upgrade data$]') as t2

If I run this on my local SQL server instance, it works fine, however to get it to work, I had to follow the procedure outlined on the below link, setting the SQL server service to run as my user account.
http://www.aspsnippets.com/Articles/The-OLE-DB-provider-Microsoft.Ace.OLEDB.12.0-for-linked-server-null.aspx
Without changing the user, I would get the following error:
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
For obvious reasons I cannot change the SQL server user on my live SQL database server.
How can I get this to run?
