Solved

Could not load file or assembly 'Microsoft.Office.Tools.Excel,

Posted on 2006-07-18
12
7,335 Views
Last Modified: 2007-12-19
When I run our asp.net applicatoin on the server I get the following error message:

Could not load file or assembly 'Microsoft.Office.Tools.Excel,


It works fine on my PC but when I deploy it and run it on the server I get the above message.  Can anyone tell me how to fix the problem?

0
Comment
Question by:fleet
  • 6
  • 5
12 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17133582
1) I am going to assume 2.0.

2) The references get stored in web.config.  You need to find the pertinent section on the development PC, and merge it with the server's config file.

Bob
0
 
LVL 9

Expert Comment

by:valkyrie_nc
ID: 17133601
It might not be in your global assembly cache. In that case, you'll need to add it.  You can download the Office PIA at http://www.microsoft.com/downloads/details.aspx?familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en, if Bob's suggestion doesn't solve the issue.

hth

valkyrie_nc
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17133718
This appears to be a reference from VSTO, which has nothing to do with Office PIA's, I don't believe.

Bob
0
 

Author Comment

by:fleet
ID: 17133867
You are correct.  We are useing Visual Studio 2005.

When you talk about the server's config file are you refering to the web.config in
the Microsoft.net\framework\v2.050727\ASP.NETwebadminfiles?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17135327
No, I am talking about the web.config file where the web site is located.

Bob
0
 

Author Comment

by:fleet
ID: 17141671
I looked in the web.config file in the web site and the reference was there.  I did a build on the project again and noticed the following warning message:

WARNING: Unable to find dependency 'MICROSOFT.OFFICE.INTEROP.EXCEL' (Signature='71E9BCE111E9429C' Version='11.0.0.0') of assembly 'Microsoft.Office.Tools.Excel.dll'

Since I get this warning message on my desktop when I do a build does it have something to do with the Office PIA?  Do I install the Office PIA on the server or my desktop or both?

I'm very new to this and very lost.  I'd appreciate any help you can provide.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 96

Expert Comment

by:Bob Learned
ID: 17141718
All you need is the generated DLL in the \bin folder for the web site.  You can file copy it there.

Bob
0
 

Author Comment

by:fleet
ID: 17148422
Which generated DLL needs to be in the web sites \bin folder?  Currently there's

Interop.Excel.dll
Interop.Microsfot.Office.core.dll
Microsoft.vbe.Interop.dll

in the web sites \bin folder.

I don't see a Microsoft.Office.Tools.Excel.dll any place on my PC.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17150977
Do you have Visual Studio Tools for Microsoft Office (VSTO) installed with VS.NET 2005?

Bob
0
 

Author Comment

by:fleet
ID: 17157218
I don't have VSTO installed with VS.NET 2005.  Can you give me a web site that will explain VSTO? Do you have to have Excel installed on the web server to use VSTO?

A Consultant created the part of the application that uses excel, a Consultant.  I was told to deploy it.   He used 'CreateObject("Excel.Application") to create the Excel spreadsheet template. Of course the Consultant is no longer working for our office and the Project Manager wants it to work on the server as soon as possible.

The reason he used 'CreateObject("Excel.Application")  is because he said he needed to open the Excel "Transmittal Template" (the template contains pre formatted fields & summary fields), write the data and save the file with new name .

Is there another way to use the Excel template? A couple of sites have talked about using Office Web Components.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 250 total points
ID: 17160213
As a confirmation of what I am talking about, here is the namespace reference:

Excel Object Model Reference (Visual Studio Tools for Office)

Microsoft.Office.Tools.Excel Namespace
http://msdn2.microsoft.com/en-us/library/microsoft.office.tools.excel.aspx

Here is the VSTO web page reference:

Visual Studio Tools for Office
http://msdn2.microsoft.com/en-us/library/ms269120.aspx

It's not free, and it's not cheap.

Purchasing Visual Studio 2005 Options
http://msdn.microsoft.com/vstudio/howtobuy/default.aspx

Look at the VSTO version pricing.

Bob
0
 

Author Comment

by:fleet
ID: 17169237
I found out that we have Visual Studio Tools for Office.  It's part of the Visual Studio Team package we have. I will read up on how to use it. The links you provided should be very helpful. Thank-you for your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
A short film showing how OnPage and Connectwise integration works.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now