[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ASP.net VS Excel

Posted on 2006-04-15
13
Medium Priority
?
289 Views
Last Modified: 2012-05-05
Hello Experts,

I wrote an ASP.net site which could import data to an excel file.
This works fine untill I post the site onto my (ASP.net)server where I become the following error each time I try to start the site by \\localhost.
----------------------------------------------------------------------------------------------------
Errormessage from  compiler: BC30002: The type Excel.Application can't be defined

Error in Source:

Regel 13:     Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Regel 14:        
Regel 15:         Dim EXL As Excel.Application      ---------> Is highlighted!!!!!!
Regel 16:         Dim WBK As Excel.Workbook
Regel 17:         Dim SHEET As Excel.Worksheet
 
Somebody an Idea????

 
0
Comment
Question by:Masterofdisaster1020
  • 5
  • 4
10 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 16460690
Hi Masterofdisaster1020,

Is Excel installed on your web server? It has to be installed in order to be instantiated.

Cheers!
0
 
LVL 2

Author Comment

by:Masterofdisaster1020
ID: 16460740
Hi emoreau

It is installed and I also loaded the refference....,

regards
masterofdisaster
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 16460746
It may be a permission problem. Is the user under which IIS runs has access to Excel?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Author Comment

by:Masterofdisaster1020
ID: 16460783
everybody, including the IIS WPG has full control on the Excel Application.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 16460795
Masterofdisaster1020,

Open the References of your project, click on Excel and Office core and set their "Copy Local"^property to True. This will adds new DLLs in your bin folder. Be sure to copy these dlls to the server.
0
 
LVL 2

Author Comment

by:Masterofdisaster1020
ID: 16460941

Cause I did not found the property, I just deleted the complete Bin dirctory and re-imported the refferences of microsoft excel 11.0 lib, but it isn't a solution.
 
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 16460993
Masterofdisaster1020,

From the solution explorer, open the "References". Click on Excel. Then in the Properties dialog, you will see the "Copy Local" property.
0
 
LVL 2

Author Comment

by:Masterofdisaster1020
ID: 16461198
emoreau

I'm working with visual web developer 2005 express edition. Could it be possible there is no possibility to change property's of the references? There is also no reference tab in my sol. expl., like it is in visual studio 2003.

When I import a reference into the project, I only become the BIN directory with the appropriate .DLL s.
 
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 16461322
In a 2005 Windows Forms application, to find the references, I have to open the properties of the project (Properties from the Project menu). in the tabs on the left, you will find "References". Click on it. Select Excel from the list and in the properties dialog you will find "Copy Local"
0
 
LVL 1

Assisted Solution

by:gr33nlant3rn
gr33nlant3rn earned 500 total points
ID: 16464147
You might want to consider not using excel directly on the web server.  Here is a link to a free dll that you might find to be a better solution.

http://www.carlosag.net/Tools/ExcelXmlWriter/Default.aspx

Some people will argue that automating excel on the web server does not scale well and is bad practice.  For that reason, it is a good idea to utilize libraries such as the above.  He has good example code on his site to get you going as well.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question