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. C / C++ / MFC
  4. Question about excel automation with VC++

Question about excel automation with VC++

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++data-structurestesting
3 Posts 2 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.
  • G Offline
    G Offline
    Gerald Mercet
    wrote on last edited by
    #1

    Hi, I have read some of microsoft tutorial about office automation. Now, i would like to fill a set of range with my application, a dialog box application. I have a set of data which are put into a dynamic array, and i would like to read all the value of the array in excel. Could i do it simply without use the expressions Range("A1")... but something like in VBA cells(i,j)? thanks in advance for your answers gerald

    S 1 Reply Last reply
    0
    • G Gerald Mercet

      Hi, I have read some of microsoft tutorial about office automation. Now, i would like to fill a set of range with my application, a dialog box application. I have a set of data which are put into a dynamic array, and i would like to read all the value of the array in excel. Could i do it simply without use the expressions Range("A1")... but something like in VBA cells(i,j)? thanks in advance for your answers gerald

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      Range("xy") *IS* cells(x,y). I don't see your point.


      sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues

      G 1 Reply Last reply
      0
      • S Stephane Rodriguez

        Range("xy") *IS* cells(x,y). I don't see your point.


        sometimes it helps to look at the IL generated code a MS guy on develop.com "answering" .NET issues

        G Offline
        G Offline
        Gerald Mercet
        wrote on last edited by
        #3

        if you want to fill cells with a for loop, how we could do that? for(i=1;i<= Bound;i++) { . . } where the term "Bound" could be different for different test( it could be equal to 20 or 10 or another number) If the size of your set of data is always the same, i know i could do it: range.GetRange(COleVariant("A1")),COleVariant("B20")) range.SetValue(COleVariant("2")) and you will see in each cell of the area A1:B20, the number "2". So, know if the width and/or the height change dynamically, how could i fill the set of cells i need? :confused:

        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