I have a small C# app that references the Microsoft Excel 12.0 Object Library. Among other things, it reads a value from an Excel cell. It reads this value from some older Excel (.xls) files and some 2007 files (.xlsx). The value comes back properly for all .xls files but I only get the following value for .xlsx files: -2146826265.
The cell I'm reading contains a simple formula: "=A1+B1".
This is the line of code I'm using
((Excel.Range)ws.Cells.get_Item(29, 17)).get_Value(null));
Where ws is the current, active worksheet.
Thanks for any help you can offer.