Error Message Opening Excel File

G

Guest

Hello -

I receive the error message:
System.Runtime.InteropServices.COMException: The remote procedure call failed.

when I open an Excel file using from an ASP.Net page.
Imports Microsoft.Office.Interop
Imports System.Runtime.InteropServices.Marshal

Public Sub LoadData()
Dim oExcel As New Excel.Application()
Dim oBooks As Excel.Workbooks
oBooks = oExcel.Workbooks
oBooks.Open("C:\ReserveDB\Excel\myfile.xls") '***** Error Message Here ****

Its interesting, the file opens without problem until I add a module to the
Excel workbook "myfile.xls". When the module is added the the error message
happens.

Suggestions?

Thank You, Mark
 
K

Ken Tucker [MVP]

Hi,

You really should not automate office from a web application.
What are you trying to do?

Ken
 
G

Guest

Ken -

I know. But I'm pretty far down the road and very close to getting the
project finished, so I don't want to turn around.

What this particular program is doing is stuffing data from an Access table
into a Excel worksheet. The Excel worksheet is a template of sorts, that
comes "alive" with the data from Access

Any suggestions on the error message?

Thanks,
Mark
 
G

Guest

Ken,

I am try to retrieve data from Excel in a web application (ASP.Net). There
are some images in the Excel worksheet that I need to get as well. How would
you approach it if not using automation of Excel? I would really like to know.

Thanks,

Richard
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top