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. for excel automation

for excel automation

Scheduled Pinned Locked Moved C / C++ / MFC
c++testingtoolsquestion
5 Posts 4 Posters 6 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

    Hello, In the samples given on microsoft support (Q178749: HOWTO Create automation project using MFC and a type library) we have to select Microsoft Excel 8.0 Object Library if we use excel automation. But what could i do if i have office XP on my workstation? thanks in advance gerald

    L G 2 Replies Last reply
    0
    • G Gerald Mercet

      Hello, In the samples given on microsoft support (Q178749: HOWTO Create automation project using MFC and a type library) we have to select Microsoft Excel 8.0 Object Library if we use excel automation. But what could i do if i have office XP on my workstation? thanks in advance gerald

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I assume you are using VC7 to import library (Excel in your case) #import "libid:\<>" if you want to be more specific with the version #import "libid:\<>" version("x.x") From what I saw MSOffice libraries are backward compatible so it should work, even though by rules of COM major version change should be treated as separate library.

      G 1 Reply Last reply
      0
      • G Gerald Mercet

        Hello, In the samples given on microsoft support (Q178749: HOWTO Create automation project using MFC and a type library) we have to select Microsoft Excel 8.0 Object Library if we use excel automation. But what could i do if i have office XP on my workstation? thanks in advance gerald

        G Offline
        G Offline
        Giles
        wrote on last edited by
        #3

        If you target the Excel 8.0 library and build your exe, it will still work on different machines with Office 2000 and Office XP, though it does not seem to work in reverse. i.e. build for the 10.0 library and run it on a machine with Excel 97.

        1 Reply Last reply
        0
        • L Lost User

          I assume you are using VC7 to import library (Excel in your case) #import "libid:\<>" if you want to be more specific with the version #import "libid:\<>" version("x.x") From what I saw MSOffice libraries are backward compatible so it should work, even though by rules of COM major version change should be treated as separate library.

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

          no i use VC++ 6.0

          A 1 Reply Last reply
          0
          • G Gerald Mercet

            no i use VC++ 6.0

            A Offline
            A Offline
            AlexO
            wrote on last edited by
            #5

            then use #import "excel8.olb" And you will have to carry excel8.olb as a part of your build. I am not sure if it is legal though, you might have to have Excel8 on your build machine, check the user agreement.

            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