January 4th, 2012, 05:10 AM
Read the calculated values from Excel using AddIn Formulas and Microsoft Object Libra
we are trying to retrieve a calculated value from a cell which has add-In (VBA) formulas in it. The sample add-in "myUtilityl.xla" is working properly in excel. It retrieves value for the addin function =ISOWEEKNUM(F9). But we are unable to retrieve the value in our application using C# & Microsoft Object Library. The add-In "myUtilityl.xla" is attached to Excel. Environment is VS2010
I am providing the sample code here.
string path = @"C:\Test.xls";
Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();
theWorkbook = app.Workbooks.Open(path);
Sheets theSheets = (Sheets)theWorkbook.Worksheets;
theWorksheet = (Worksheet)theWorkbook.Worksheets.get_Item("Sheet1");
readRange = theWorksheet.get_Range("B1");
I am new to Microsoft Object library. Any help or clue will be very helpful.
Tags for this Thread
Click Here to Expand Forum to Full Width