Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
RegisteredFunctions in C# fails when trying to get the list of addins and function
Hello
I am using a small C# program which uses the office interop and tries to get the list of addin in a worksheet, but it always returns a System.DBNull but if I write a small VBA procedure it always succeeds any ideas or thoughts, I have attach a the code been executed in C#. using System; using Microsoft.Office.Core; using System.Runtime.InteropServices; using System.Reflection; using System.Windows.Forms; namespace ExcelRangeRunMacro { class Class1 { [STAThread] static void Main(string[] args) { RunTest(); Console.ReadLine(); } private static void RunTest() { Excel._Application xlApplication = null; Excel._Workbook workbook = null; //Start Excel and get Application object. xlApplication = (Excel.Application) new Excel.Application(); xlApplication.Visible = true; workbook = (Excel._Workbook)(xlApplication.Workbooks.Open(@"H :\Personal\abc_mod.xls", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing)); xlApplication.Visible = true; xlApplication.UserControl = true; object olist2 = xlApplication.get_RegisteredFunctions(Type.Missing , Type.Missing); } } } |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
combination IF- and VLOOKUP-function fails | Excel Worksheet Functions | |||
Excel fails to update call to user-written function. | New Users to Excel | |||
Hyperlink function fails when using variable row number | Excel Worksheet Functions | |||
Function fails to calculate | Excel Worksheet Functions | |||
In Excel, why sort function fails when applied to a list of date? | Excel Discussion (Misc queries) |