I'm building a C# addin for Autodesk Inventor. The only reason this is relevant is because I had to uncheck the box "Register for COM Interop".
Here's what I'm using. The xls is always in the same directory the code is running in. I've tried this with an absolute path as well, but I get the same error. The bool is for testing only, but it returns true. The file is not read-only.
bool fileExists = File.Exists ("Assembly3.xls");
xlBook = xlApp.Workbooks.Open ("Assembly3.xls");
Error message I'm getting: https://dl.dropbox.com/u/46698764/cantFindFile.png Since it says COMException, I'm thinking my problem might be because I unchecked the "Register for COM Interop" box. If this is the case, can someone recommend a different way to open the workbook?
If it matters, I have Excel 2010.