Excel interop: _Worksheet or Worksheet?

前端 未结 5 1906
刺人心
刺人心 2020-11-28 07:46

I\'m currently writing about dynamic typing, and I\'m giving an example of Excel interop. I\'ve hardly done any Office interop before, and it shows. The MSDN Office Interop

5条回答
  •  孤独总比滥情好
    2020-11-28 08:21

    MSDN shows that the Worksheet interface simply inherits from the _Worksheet and DocEvents_Event interfaces. It would seem that one simply provides the events that a worksheet object might raise in additional to everything else. As far as I can see, Worksheet doesn't provide any other members of its own. So yeah, you might as well just go with using the Worksheet interface in all cases, since you don't lose anything by it, and potentially might need the events it exposes.

提交回复
热议问题