Link to home
Start Free TrialLog in
Avatar of fleet
fleet

asked on

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

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?

Avatar of Bob Learned
Bob Learned
Flag of United States of America image

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
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
This appears to be a reference from VSTO, which has nothing to do with Office PIA's, I don't believe.

Bob
Avatar of fleet
fleet

ASKER

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?
No, I am talking about the web.config file where the web site is located.

Bob
Avatar of fleet

ASKER

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.
All you need is the generated DLL in the \bin folder for the web site.  You can file copy it there.

Bob
Avatar of fleet

ASKER

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

Bob
Avatar of fleet

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fleet

ASKER

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.