Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Error Message Opening Excel File

Reply
Thread Tools

Error Message Opening Excel File

 
 
=?Utf-8?B?TWFyaw==?=
Guest
Posts: n/a
 
      12-01-2005
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
 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      12-01-2005
Hi,

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

Ken
-----------------
"Mark" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFyaw==?=
Guest
Posts: n/a
 
      12-02-2005
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
> -----------------


 
Reply With Quote
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      12-02-2005
Hi,

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

Ken
-----------------
"Mark" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>> -----------------

>



 
Reply With Quote
 
=?Utf-8?B?UmljaGFyZA==?=
Guest
Posts: n/a
 
      02-01-2006
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with opening Excel after opening Excel inside Microsoft Internet Controls fniles ASP General 0 04-26-2009 09:39 PM
Word file not opening from Adm -My recent docs but opening from file menu of Word Thaqalain Computer Support 0 06-30-2005 02:20 AM
OLE & Excel - Opening causes Excel.exe to hang around TimmyD Perl Misc 0 04-21-2005 07:20 PM
Error opening Excel file 'named range' as recordset in ASP g_mx6 ASP General 3 02-20-2004 10:46 PM
Not WEnough Memory Error When Opening A Large Excel file John Computer Support 1 08-26-2003 05:54 PM



Advertisments