Error in Retrieving Worksheet.OLEObjects property

S

Sarang

Hi All,


I have an Excel Addin written in C# (.Net 1.1). I am trying to get the
collection of Worksheet.OLEObjects property(using C#) by this method:


Excel.OLEObjects oles = (Excel.OLEObjects)
xlSheet.GetType().InvokeMember("OLEObjects", BindingFlags.Default |
BindingFlags.GetProperty, null, xlSheet, new object[] {});


This was working previously, but suddenly 2-3 days back this stopped
working. I am working with VS .Net 2003 and Excel 2003. I also have VS .NEt
2005 installed on my machine.


Recently VS .NET 2005 SP1 was applied on my machine. I suspect that this is
the problem, but cannot relate to it. The Exception message just shows a "?".


Here is the Error Stack Trace:


mscorlib
?
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
binder, Object target, Object[] args)
at MyExcelAddin.MyWorksheet.getListOle()


What can be the issue?


Regards


Sarang Bapat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top