ASP.net VS Excel

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????

 
LVL 2
Masterofdisaster1020Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
Hi Masterofdisaster1020,

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

Cheers!
Masterofdisaster1020Author Commented:
Hi emoreau

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

regards
masterofdisaster
Éric MoreauSenior .Net ConsultantCommented:
It may be a permission problem. Is the user under which IIS runs has access to Excel?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Masterofdisaster1020Author Commented:
everybody, including the IIS WPG has full control on the Excel Application.
Éric MoreauSenior .Net ConsultantCommented:
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.
Masterofdisaster1020Author Commented:

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.
 
Éric MoreauSenior .Net ConsultantCommented:
Masterofdisaster1020,

From the solution explorer, open the "References". Click on Excel. Then in the Properties dialog, you will see the "Copy Local" property.
Masterofdisaster1020Author Commented:
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.
 
Éric MoreauSenior .Net ConsultantCommented:
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"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gr33nlant3rnCommented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.