QueryInterface, with the object Excel.Application

D

Dominique MILLOT

Hello,

With Asp.Net, I try to generat a document with an Excel object.

This is the begin of my procedure:
Dim xapExcel As Excel.Application
xapExcel = New Excel.Application()
xapExcel.Visible = False

At the last line I obtain this error:
"System.InvalidCastException: QueryInterface for interface
Excel._Application failed."

Other clues:
- I have granted AspNet to run Excel (with the tool DComCnfg.exe).
- I use Office XP in english, but the Os and .Net was in french. I have make
some tests without succes by changing CurrentCulture.

Someone have a solution ?

Regards.
 
D

Dominique MILLOT

Thanks for your answer;

tlbimp was certainly usefull for Excel 5, 2000.
But I think we didn't need it for Office XP (2002)

And in add, it was recommanded on every doc I find for C and not for VB.

(Or I didn't understand tlbimp use)

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top