Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. dispinterface question

dispinterface question

Scheduled Pinned Locked Moved COM
questioncomtutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brian van der Beek
    wrote on last edited by
    #1

    Hi, I have an application with some COM objects. Now I want to expose some of these objects the way excel does. For example: Worksheets("sheet1").Range("A1").value = value Does anyone know how excel exposes these Sheet objects?

    P V 2 Replies Last reply
    0
    • B Brian van der Beek

      Hi, I have an application with some COM objects. Now I want to expose some of these objects the way excel does. For example: Worksheets("sheet1").Range("A1").value = value Does anyone know how excel exposes these Sheet objects?

      P Offline
      P Offline
      pba_
      wrote on last edited by
      #2

      Derive your interfaces from IDispatch if you want to be automation compatible. In Excel case the interface probably has a method called "Worksheets" which takes a BSTR param and returns a Range object : IExcelInterface::Worksheets(BSTR sheet) : Range; The object Range implements an interface IRange, which has a range method : IRange::Range(BSTR range) : Value; The value object has a property named "value". ... and so on. All you need to do is to expose your application object model ( COM object hierarchy ) to the automation clients ( scripts, binaries, etc ).

      1 Reply Last reply
      0
      • B Brian van der Beek

        Hi, I have an application with some COM objects. Now I want to expose some of these objects the way excel does. For example: Worksheets("sheet1").Range("A1").value = value Does anyone know how excel exposes these Sheet objects?

        V Offline
        V Offline
        Vi2
        wrote on last edited by
        #3

        Take a look at Using Standard Objects[^] and below. Intend the "Worksheets" instead of "Documents" there. With best wishes, Vita

        B 1 Reply Last reply
        0
        • V Vi2

          Take a look at Using Standard Objects[^] and below. Intend the "Worksheets" instead of "Documents" there. With best wishes, Vita

          B Offline
          B Offline
          Brian van der Beek
          wrote on last edited by
          #4

          Thanx! This seems to be really usefull info.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups