473,493 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error Message Opening Excel File

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
Dec 1 '05 #1
4 2498
Hi,

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

Ken
-----------------
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:07**********************************@microsof t.com...
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

Dec 1 '05 #2
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

"Ken Tucker [MVP]" wrote:
Hi,

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

Ken
-----------------


Dec 2 '05 #3
Hi,

http://support.microsoft.com/default...b;en-us;319180

Ken
-----------------
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E9**********************************@microsof t.com...
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

"Ken Tucker [MVP]" wrote:
Hi,

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

Ken
-----------------

Dec 2 '05 #4
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
"Ken Tucker [MVP]" wrote:
Hi,

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

Ken
-----------------
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:07**********************************@microsof t.com...
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


Feb 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6662
by: g_mx6 | last post by:
I am not sure what I am doing wrong. I am trying to open a DSNLess connection and retrieve the data in an Excel sheet using ASP. Shouldnt be this complicated but I've been trying to get this to...
1
3101
by: ST | last post by:
Hi, I'm having problems opening up excel thru my code. It will write and saveas an excel file, but the application won't open on the user's computer, excel seems to be hidden, because it shows up...
17
27215
by: Ange T | last post by:
Hi there, I'm having pain with the VB behind an Access form. The form is used to create reports in Excel based on the details entered in the form. This has always worked without error on my...
7
2658
by: Kathryn Townsend | last post by:
We have a customer using our Acc97 Runtime application on a Win 98 machine that was recently upgraded to WinXP Home Edition Service Pack 1. Shes states RAM is 228, CPU Pentium II 398 MHz , Hard...
0
1441
by: Garth | last post by:
Hi, I'm opening and closing an excel using C#. Once the file has been opened and closed I then double click on the file with Windows Explorer and excel opens and then just hangs. Can anyone help?...
4
2067
by: Mark | last post by:
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...
0
1281
by: MAT | last post by:
Hi. In my C# Application I open an Excelworkbook and try to write some data to it. The excel file has some macros,which are disabled (Macro security is high). One of the macros try to load an...
0
1167
by: manontheedge | last post by:
I have a program in VB6 that gets data from an internet site, puts it in excel, then opens that excel sheet. It works, but only because I'm throwing an exception and ignoring the error that keeps...
1
6140
by: mohanprasadgutta | last post by:
Hi, I need help to open a password protected excel file in perl using Win32:OLE. when I tried to open file in normal way at the time of program execution it is prompting me to enter password. I am...
5
5853
geolemon
by: geolemon | last post by:
Import text wizard says: I'm banging my head on this one, here's why: I've been importing files using this process and data format, with success! I created a temporary table in Access to...
0
7119
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5453
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1400
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
644
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
285
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.