error BC30002: Type Excel.Application is not Defined - DOTNET

This is a discussion on error BC30002: Type Excel.Application is not Defined - DOTNET ; Can anyone tell me why I am getting this error? It bombs on this line of my VB code: Public appExcel As New Excel.Application It works when I test it on my machine but once I release the page to ...

+ Reply to Thread
Results 1 to 9 of 9

error BC30002: Type Excel.Application is not Defined

  1. Default error BC30002: Type Excel.Application is not Defined

    Can anyone tell me why I am getting this error? It bombs on this line
    of my VB code:
    Public appExcel As New Excel.Application

    It works when I test it on my machine but once I release the page to
    the web server I get the error when I click on a hyperlink that loads
    the page. I have the Interop.Excel and Interop.Microsoft.Office.Core
    references added to my project but I still get this error. What am I
    missing?


  2. Default RE: error BC30002: Type Excel.Application is not Defined

    You need to install Excel on the server as well. Remember the interop
    libraries are just wrappers around the actual Excel COM library.

    BTW, automating Microsoft Office applications on server-side is not
    recommended and nor supported. For more info, read
    http://support.microsoft.com/kb/257757/

    "Mel" wrote:

    > Can anyone tell me why I am getting this error? It bombs on this line
    > of my VB code:
    > Public appExcel As New Excel.Application
    >
    > It works when I test it on my machine but once I release the page to
    > the web server I get the error when I click on a hyperlink that loads
    > the page. I have the Interop.Excel and Interop.Microsoft.Office.Core
    > references added to my project but I still get this error. What am I
    > missing?
    >
    >


  3. Default Re: error BC30002: Type Excel.Application is not Defined

    "Mel" <MLightsOut> wrote in message
    news:1186760868.623475.21870@d30g2000prg.googlegroups.com...

    > Can anyone tell me why I am getting this error? It bombs on this line
    > of my VB code:
    > Public appExcel As New Excel.Application


    Because server-side Office automation doesn't work:
    http://support.microsoft.com/default...US;q257757#kb2

    You'll need to find a different method of integrating Excel into your
    ASP.NET app - what are you trying to do exactly...?


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net


  4. Default Re: error BC30002: Type Excel.Application is not Defined

    On Aug 10, 11:45 am, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
    > "Mel" <MLights...> wrote in message
    >
    > news:1186760868.623475.21870@d30g2000prg.googlegroups.com...
    >
    > > Can anyone tell me why I am getting this error? It bombs on this line
    > > of my VB code:
    > > Public appExcel As New Excel.Application

    >
    > Because server-side Office automation doesn't work:http://support.microsoft.com/default...US;q257757#kb2
    >
    > You'll need to find a different method of integrating Excel into your
    > ASP.NET app - what are you trying to do exactly...?
    >
    > --
    > Mark Rae
    > ASP.NET MVPhttp://www.markrae.net


    The Excel spreadsheet is a calculator. It has a ton of formulas which
    were written by a 3rd party vendor of ours. Instead of reinventing
    the wheel and creating a new web page which incorporates all of those
    same formulas I figured it was easier to just have Excel run in the
    background with that spreadsheet open (for read only access). The
    idea is, when the user changes an input field on the web page the
    visual basic code changes the corresponding field in the spreadsheet
    which is running in the background and just retrieves the results from
    the spreadsheet and places them on the web page "outputs" section.

    Then, as far as maintenance is concerned, if in the future any of the
    calculations change we can just update the spreadsheet and no code
    would need to be changed on the web site.



  5. Default Re: error BC30002: Type Excel.Application is not Defined

    "Mel" <MLightsOut> wrote in message
    news:1186765433.446710.204210@z24g2000prh.googlegroups.com...

    > I figured it was easier to just have Excel run in the background


    Won't work, I'm afraid - Excel (like the rest of Office) just isn't designed
    to be run like this...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net


  6. Default Re: error BC30002: Type Excel.Application is not Defined

    On Aug 10, 12:16 pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
    > "Mel" <MLights...> wrote in message
    >
    > news:1186765433.446710.204210@z24g2000prh.googlegroups.com...
    >
    > > I figured it was easier to just have Excel run in the background

    >
    > Won't work, I'm afraid - Excel (like the rest of Office) just isn't designed
    > to be run like this...
    >
    > --
    > Mark Rae
    > ASP.NET MVPhttp://www.markrae.net


    Seriously. That stinks. So what are my alternatives?


  7. Default Re: error BC30002: Type Excel.Application is not Defined

    On Aug 10, 11:16 am, Siva M <shiva...@online.excite.com> wrote:
    > You need to install Excel on the server as well. Remember the interop
    > libraries are just wrappers around the actual Excel COM library.
    >
    > BTW, automating Microsoft Office applications on server-side is not
    > recommended and nor supported. For more info, readhttp://support.microsoft.com/kb/257757/
    >
    > "Mel" wrote:
    > > Can anyone tell me why I am getting this error? It bombs on this line
    > > of my VB code:
    > > Public appExcel As New Excel.Application

    >
    > > It works when I test it on my machine but once I release the page to
    > > the web server I get the error when I click on a hyperlink that loads
    > > the page. I have the Interop.Excel and Interop.Microsoft.Office.Core
    > > references added to my project but I still get this error. What am I
    > > missing?


    Yep, we did install Excel on the web server. If it's not supported
    does that mean it absolutely can't be done? Is that the reason why I
    am getting the error message, because it's not supported?


  8. Default Re: error BC30002: Type Excel.Application is not Defined

    "Mel" <MLightsOut> wrote in message
    news:1186767772.047424.228350@d30g2000prg.googlegroups.com...

    > If it's not supported does that mean it absolutely can't be done?


    Yes.

    > Is that the reason why I am getting the error message, because it's not
    > supported?


    The reason you're getting the error message is because it doesn't work,
    which is also the reason why it's not supported...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net


  9. Default Re: error BC30002: Type Excel.Application is not Defined

    "Mel" <MLightsOut> wrote in message
    news:1186766927.006218.323120@e9g2000prf.googlegroups.com...

    > Seriously. That stinks. So what are my alternatives?


    http://www.aspose.com/Products/Aspos...s/Default.aspx

    Says it supports VBA, though I've never used it in this way...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net


+ Reply to Thread

Similar Threads

  1. Compiler Error Message: BC30002: Type 'CUNAMutual.CorporateCompone
    By Application Development in forum DOTNET
    Replies: 0
    Last Post: 08-14-2007, 03:10 PM
  2. 5053 Application-defined or object-defined error
    By Application Development in forum XML SOAP
    Replies: 2
    Last Post: 09-28-2006, 08:19 AM
  3. Application-defined or object-defined error
    By Application Development in forum Inetserver
    Replies: 1
    Last Post: 11-18-2005, 12:46 PM
  4. Replies: 0
    Last Post: 02-16-2005, 10:53 PM
  5. BC30002: Type 'OleDb.OleDbCommand' is not defined
    By Application Development in forum DOTNET
    Replies: 0
    Last Post: 11-03-2003, 12:49 PM