Results 1 to 10 of 10

Thread: Ole objects in Qt(MS OFFice)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 11 Times in 8 Posts

    Default Re: Ole objects in Qt(MS OFFice)

    try passing the document you want to view as the control (like "C:\\somedoc.xls") .
    The QAxWidget with setControl to a file generates warnings and says that an object doesn't support automation and fails to activate it.
    Any ideas why it happens?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Ole objects in Qt(MS OFFice)

    Quote Originally Posted by mchara View Post
    The QAxWidget with setControl to a file generates warnings and says that an object doesn't support automation and fails to activate it.
    Any ideas why it happens?
    Indeed weird, try passing "Excel.Application" then. And check out the "webbrowser" example - it uses the approach directly to embed a web browser and call its functions. You can use it as a test bed (even from within Designer), you just might need to remove the dynamicCall() line.

    Sorry I can't test it by myself but I don't have Excel and I'm currently working on Linux and don't want to stop to reboot the machine

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Ole objects in Qt(MS OFFice)

    I first tried
    dumpcpp Excel.Application -o excel
    which only gave me
    dumpcpp: type library '' not found
    Then I found this thread: http://lists.trolltech.com/qt-intere.../msg00704.html, so I tried:
    dumpcpp {00020813-0000-0000-C000-000000000046} -o excel
    which worked, but the resulting excel.h is 166k lines so I don't feel like diving into it as I'm not that familiar with the subject.
    J-P Nurmi

  4. #4
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 11 Times in 8 Posts

    Default Re: Ole objects in Qt(MS OFFice)

    Yeah, already tried... but it generates automation object interface only.
    Just as QAxObject ...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.