开发者

how can i identify an MS Excel object type?

I'm using late bin开发者_运维技巧ding OLE automation to work with Excel. The problem is that I don't know how to work with the value returned by Selection because I don't know what type it is...

How can I determine what kind of object it has returned to me? I'd hope for a type name....

Or must I run through a list of values I'm expecting?


You can cast the object to IDispatch call the GetTypeInfo() method to get a ITypeInfo interface and there you can call the GetDocumentation() method with memid=MEMBERID_NIL to get the name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜