Excel automation

G

Guest

I'm automating Excel from asp.net application on window2000.
the application work fine on the developpement machine but not on the
production server.

when the runtime hit the second line of code:
Dim xl As New Excel.Application
Dim wb As Excel.Workbook = xl.Workbooks.Open("file.xls")
it throw this error:
"System.InvalidCastException: QueryInterface for interface
Excel._Application failed"

thanks for help
 
S

Stephen Bullen

Hi Zino,
I'm automating Excel from asp.net application on window2000.
the application work fine on the developpement machine but not on the
production server.

when the runtime hit the second line of code:
Dim xl As New Excel.Application
Dim wb As Excel.Workbook = xl.Workbooks.Open("file.xls")
it throw this error:
"System.InvalidCastException: QueryInterface for interface
Excel._Application failed"

Excel is not designed to be run on a server in this manner. If you
search the Microsoft KB for 'Excel Server' you should find some
information about the (many) issues.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk
 

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

Top