Sometimes you need to use excel automation and you’d like to have your service or web application running under an service account identity. In some cases excel wants to run some setup on first use by an account. One way is to log into the machine using that account and open excel. A quicker way is to use the following command.

C:\Program Files\Microsoft Office\OFFICE11>runas /user:MyServiceAcct excel.exe