Solved

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

Posted on 2006-07-18
12
7,318 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
No, I am talking about the web.config file where the web site is located.

Bob
0
 

Author Comment

by:fleet
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 96

Expert Comment

by:Bob Learned
Comment Utility
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
Comment Utility
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
Comment Utility
Do you have Visual Studio Tools for Microsoft Office (VSTO) installed with VS.NET 2005?

Bob
0
 

Author Comment

by:fleet
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

12 Experts available now in Live!

Get 1:1 Help Now