Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > error BC30002: Type Excel.Application is not Defined

Reply
Thread Tools

error BC30002: Type Excel.Application is not Defined

 
 
Mel
Guest
Posts: n/a
 
      08-10-2007
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?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2l2YSBN?=
Guest
Posts: n/a
 
      08-10-2007
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?
>
>

 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      08-10-2007
"Mel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.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

 
Reply With Quote
 
Mel
Guest
Posts: n/a
 
      08-10-2007
On Aug 10, 11:45 am, "Mark Rae [MVP]" <(E-Mail Removed)> wrote:
> "Mel" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) ups.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.


 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      08-10-2007
"Mel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.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

 
Reply With Quote
 
Mel
Guest
Posts: n/a
 
      08-10-2007
On Aug 10, 12:16 pm, "Mark Rae [MVP]" <(E-Mail Removed)> wrote:
> "Mel" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.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?

 
Reply With Quote
 
Mel
Guest
Posts: n/a
 
      08-10-2007
On Aug 10, 11:16 am, Siva M <(E-Mail Removed)> 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?

 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      08-10-2007
"Mel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.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

 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      08-10-2007
"Mel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.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 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
User-defined exception: "global name 'TestRunError' is not defined" jmike@alum.mit.edu Python 1 07-10-2008 12:37 PM
'ifstream' is used as a type, but is not defined as a type. uche C++ 4 02-18-2007 12:44 AM
#if (defined(__STDC__) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) Oodini C Programming 1 09-27-2005 07:58 PM
Compiler Error Message: BC30002: Type 'LdapAuthentication' is not defined Nuve ASP .Net 0 10-22-2003 08:27 PM
'NODE' is used as a type, but has not been defined as a type Kabeer C++ 6 08-21-2003 03:54 PM



Advertisments