Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Interop: Workbooks.Add throws exception 800a03ec

Status
Not open for further replies.

ProtocolPirate

Programmer
Nov 21, 2007
104
US
My VB.NET program works great on my machine, but on our 2003 server with Office 2007 installed the Workbooks.Add method fails with this mysterious exception.
 
I'm affraid that the excel's version matters. I had such experience before.
One of many ways (I hope) is to declare each excel object as object. Take a look at CreateObject function.

Regards.
 
No, that is not .NET syntax. I don't remember how I fixed this, but it was not connected to any of the usual cases associated with that exception number.
 
I've not played with macros and such in office 2007 so I can't say anything for sure. Also I don't know if it still has the equivalent of vba, but if so open an excel workbook and try it in vba and see what is required of Workbook.Add. All vb.net is doing is sending the commands along to Excel so if it is right in Excel it will be right in vb.net.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top