I need to use Excel
if it is installed on the target machine, or produce a text
file if it is not.
I check for the presence of the excel application
registry key, but before I can do that, I get a
System.IO.FileNotFoundException: Could not load file or assembly Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c
or one of its dependencies.
How can I detect if an interop
assembly is available and prevent the run-time
trying to load it if it isn't. (I don't know what version of Excel
may exist on the target, so I don't think I can redistribute an interop
in case its the wrong one.)