How to add Interop.Excel

Topics: User Forum
Oct 21, 2008 at 8:59 AM
Hi all,

I am trying to build the documentation for a small project that uses Interop.Excel and keep getting the following error:

<title></title> <style> body { font-size: 10pt; font-family: Arial, Verdana, sans-serif; color: black; background-color: white; } h3 { margin: 0px; } h4 { margin: 0px; } pre { font-family: Consolas, "Courier New", Courier, monospace; font-size: 10pt; margin-top: 0px; margin-left: 20px; margin-bottom: 20px; padding: 0px; } .SectionHeader { background-color: #0066cc; color: white; padding: 5px; width: 95%; margin-left: 0px; margin-right: 2px; margin-top: 0px; padding: 2px; } .CollapsedHeader { background-color: #dcdcdc; color: black; padding: 5px; width: 95%; margin-left: 0px; margin-right: 2px; margin-top: 0px; padding: 2px; } .Warning { font-weight: bold; background-color: #ffd700; padding: 2px; } .Error { font-weight: bold; background-color: #b22222; color: #ffffff; padding: 2px; } .CollapseBox { cursor: pointer; color: black; text-align: center; border-style: solid; border-width: 1px; border-color: gray; margin-left: 0px; margin-right: 2px; margin-top: 0px; padding: 2px; width: 20px; } .ScriptName { font-weight: bold; } .PlugIn { border-left: black 5px solid; padding-top: 5px; padding-bottom: 5px; padding-left: 10px; } .PlugInHeader { background-color: #cccc99; color: black; width: 95%; padding: 2px; } </style>
Generating reflection information...
[C:\Documents and Settings\jxhawk\Desktop\Help\Working\GenerateRefInfo.bat]
MrefBuilder (v2.4.10520.1)
Copyright ¸ Microsoft 2006
Info: Loaded 1 assemblies for reflection and 0 dependency assemblies.
Error: Unresolved assembly reference: Interop.Excel (Interop.Excel, Version=, Culture=neutral, PublicKeyToken=null) required by checkDalekDeployment
Last step completed in 00:00:00.9063


I am not really sure why this is happening to be honest, I have looked through the dependencies and can not see any references to this COM object.  I tried googling it but with little success.  Is it possible for this to work?  Do I need to do it in another way?  I am rather new to sandcastle as a whole so it might be that I just missing a piece of knowledge on how to use this.

Oct 21, 2008 at 3:09 PM
Your assembly might not reference it but one of its dependencies probably does (dependency of a dependency).  Add the indicated interop assembly to the project's Dependencies property (either a GAC or file reference depending on where you can find it).

Oct 22, 2008 at 8:34 AM
Hi EWoodruff,

Thank you for your reply.  I do use Microsoft Excel 11.0 Object Library COM reference.  In my references in the actual C# project in References project I have:


Listed but when I got to SandCastle Help builder, dependencies and GAC references I can not find either an Excel, interop.excel or  I am not sure where I would add a file reference.

Sorry for being a bit lame about this but its all new and not sure where to look to try and resolve it.

Thanks again for the help.

Oct 22, 2008 at 1:59 PM

So I was being a plonker and didn't notice it had given me an excel.dll file when it compiled the project.  I had presumed I needed to add a reference in a similar way that I did when I created the project.

All sorted.  Thank you EWoodruff for your help and support!

all the best