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. Use OLE

Use OLE

Scheduled Pinned Locked Moved C / C++ / MFC
comhelp
10 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.
  • M Offline
    M Offline
    MKC002
    wrote on last edited by
    #1

    To preview xls file i call CreateFromFile or CreateFromClipboard and it works But if xls file has password and i do not enter it then my program hangs. It gives switch to/retry message. Is there any way to solve this problem

    D 1 Reply Last reply
    0
    • M MKC002

      To preview xls file i call CreateFromFile or CreateFromClipboard and it works But if xls file has password and i do not enter it then my program hangs. It gives switch to/retry message. Is there any way to solve this problem

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      MKC002 wrote:

      Is there any way to solve this problem

      How about using Excel automation instead (where the password can be provided to the Open function)?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

      M 1 Reply Last reply
      0
      • D David Crow

        MKC002 wrote:

        Is there any way to solve this problem

        How about using Excel automation instead (where the password can be provided to the Open function)?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

        M Offline
        M Offline
        MKC002
        wrote on last edited by
        #3

        I want to show excel file contents in my own window

        D 1 Reply Last reply
        0
        • M MKC002

          I want to show excel file contents in my own window

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Ok, so what's the problem?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

          M 1 Reply Last reply
          0
          • D David Crow

            Ok, so what's the problem?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

            M Offline
            M Offline
            MKC002
            wrote on last edited by
            #5

            CreateFromFile hangs my program. If excel file contains some password and i call CreateFromFile for that file, it asks me to enter password. If i click on cancel button and do not enter the password then my program hangs. It gives retry/switch-to message. How to solve this problem.

            D 1 Reply Last reply
            0
            • M MKC002

              CreateFromFile hangs my program. If excel file contains some password and i call CreateFromFile for that file, it asks me to enter password. If i click on cancel button and do not enter the password then my program hangs. It gives retry/switch-to message. How to solve this problem.

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              MKC002 wrote:

              How to solve this problem.

              Use Excel automation instead, where the password can be provided to the Open() function.

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

              M 1 Reply Last reply
              0
              • D David Crow

                MKC002 wrote:

                How to solve this problem.

                Use Excel automation instead, where the password can be provided to the Open() function.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                M Offline
                M Offline
                MKC002
                wrote on last edited by
                #7

                I want to open excel file contents in my own window, not in excel window. Is that possible with excel automation?

                D 1 Reply Last reply
                0
                • M MKC002

                  I want to open excel file contents in my own window, not in excel window. Is that possible with excel automation?

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  MKC002 wrote:

                  Is that possible with excel automation?

                  Yes.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                  M 1 Reply Last reply
                  0
                  • D David Crow

                    MKC002 wrote:

                    Is that possible with excel automation?

                    Yes.

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                    M Offline
                    M Offline
                    MKC002
                    wrote on last edited by
                    #9

                    Thanks for confirmation Is there any example available in VC++ Can you please give some link

                    D 1 Reply Last reply
                    0
                    • M MKC002

                      Thanks for confirmation Is there any example available in VC++ Can you please give some link

                      D Offline
                      D Offline
                      David Crow
                      wrote on last edited by
                      #10

                      MKC002 wrote:

                      Is there any example available in VC++
                      Can you please give some link

                      Google produced the following: http://support.microsoft.com/kb/216686[^] http://support.microsoft.com/kb/196776/[^] http://code.msdn.microsoft.com/office/CppAutomateExcel-be36992e[^]

                      "One man's wage rise is another man's price increase." - Harold Wilson

                      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                      "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                      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