Error Message Opening Excel File

Discussion in 'ASP .Net' started by =?Utf-8?B?TWFyaw==?=, Dec 1, 2005.

  1. 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
     
    =?Utf-8?B?TWFyaw==?=, Dec 1, 2005
    #1
    1. Advertising

  2. Hi,

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

    Ken
    -----------------
    "Mark" <> wrote in message
    news:...
    > 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
     
    Ken Tucker [MVP], Dec 1, 2005
    #2
    1. Advertising

  3. 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
    > -----------------
     
    =?Utf-8?B?TWFyaw==?=, Dec 2, 2005
    #3
  4. Hi,

    http://support.microsoft.com/default.aspx?scid=kb;en-us;319180

    Ken
    -----------------
    "Mark" <> wrote in message
    news:...
    > 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
    >> -----------------

    >
     
    Ken Tucker [MVP], Dec 2, 2005
    #4
  5. 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" <> wrote in message
    > news:...
    > > 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

    >
    >
    >
     
    =?Utf-8?B?UmljaGFyZA==?=, Feb 1, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Claudio Grondi
    Replies:
    8
    Views:
    800
    Georg Brandl
    Aug 28, 2006
  2. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,548
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  3. g_mx6
    Replies:
    3
    Views:
    190
    g_mx6
    Feb 20, 2004
  4. fniles
    Replies:
    0
    Views:
    282
    fniles
    Apr 26, 2009
  5. TimmyD
    Replies:
    0
    Views:
    184
    TimmyD
    Apr 21, 2005
Loading...

Share This Page