Note that there are some explanatory texts on larger screens.

plurals
  1. POExcel Automation Workbooks.Open fails: "Unable to get the Open Property ..."
    text
    copied!<p>I'm working with a web application that performs some Excel automation (I know - not a preferred solution). </p> <p>I am using Excel 2007 as my development platform but the target server uses Excel 2003. After experiencing a lot of headaches with the Excel 12 interop trying to be loaded on the target server even though I expressly selected Excel 11 during development, I have resorted to using <strong>late binding</strong> rather than early binding. </p> <p>This has allowed me to get as far so as to instantiate Excel (and I can see the Excel process start in task manager on the target server). </p> <p>However I am unable to invoke the Open method of the late-bound Workbooks object. It throws this error at me:</p> <pre><code>"Unable to get the Open property of the Workbooks class" </code></pre> <p>I have been experimenting with a few different things and have tried the following:</p> <p><li>Try the same Workbooks.Open call using late-binding VBScript (e.g. a vbs file).</li> <li>Try the same Workbooks.Open call using late-binding VBA code (e.g. in Excel).</li> <li>Try the same Workbooks.Open call using late-binding .NET code in a Windows Forms application. </li></p> <p>In all three cases, the Excel automation <strong>succeeds</strong>. It's only when I deploy the ASP.NET application that this error crops up. In a very simplified form, the code resembles:</p> <pre><code>Dim xlApp As Object 'Excel.Application Dim xlBook As Object ' Excel.Workbook xlApp = CreateObject("Excel.Application") 'New Excel.Application xlBook = xlApp.Workbooks.Open("somefile.xls", , True, , , , , , , , , , , , False) </code></pre> <p>Does anyone have any ideas as to what might be happening? I checked the user that the Excel process starts as, and it is the same user that I successfully ran the Windows Forms .NET application as successfully. I had already opened Excel as this user to clear all the initial setup stuff. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload