Everywhere I look for how to use excel function inside of a C# application tells me to do the following:
- From the COM TabAdd the following using statement:using IExcel = Microsoft.Office.Interop.Excel
- Then declare and initialise a IWorkSheetFunction objectIExcel.IWorksheetFunction iwf = new IExcel.IWorksheetFunction();
- Now you can use the functions as in int result = iwf.Math.Sum(1,2);
The problem im having is that while intellisense is detecting IExcel, it is not showing IWorksheetFunction. It is however showing WorksheetFunction. Either way, it is not letting me instantiate it as an object. I am getting the error: Cannot create an instance of the abstract class or interface 'Microsoft.Office.Interop.Excel.WorksheetFunction'
any ideas?