Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Active Qt Problem
Forum Updated to NodeBB v4.3 + New Features

Active Qt Problem

Scheduled Pinned Locked Moved General and Desktop
12 Posts 3 Posters 5.7k 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.
  • K Offline
    K Offline
    kingsta
    wrote on last edited by
    #1

    Hello guys.

    I want to make a program which should does read datas from Excel file and write datas to Excel file. I guess I can do that with Active Qt. I cant find tutorial or good documents about Active Qt. How can i learn that?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sportlover
      wrote on last edited by
      #2

      "Documentation":http://qt-project.org/doc/qt-4.8/activeqt.html
      And searching this site will offer a lot of good starting points! Using the keywords: 'ActiveQt' and/or 'excel' will offer enough examples / threads. Goodluck!

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kingsta
        wrote on last edited by
        #3

        [quote author="NL - Danny" date="1363953377"]"Documentation":http://qt-project.org/doc/qt-4.8/activeqt.html
        And searching this site will offer a lot of good starting points! Using the keywords: 'ActiveQt' and/or 'excel' will offer enough examples / threads. Goodluck![/quote]

        I am looking. I hope I can understand.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sportlover
          wrote on last edited by
          #4

          Keep us posted!

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Beberd
            wrote on last edited by
            #5

            I've find two topics for you. I think they should be help you.
            http://qt-project.org/forums/viewthread/1871
            http://www.qtcentre.org/threads/9088-ActiveQt-Excel

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kingsta
              wrote on last edited by
              #6

              I am trying to do that but I have a problem.

              @
              #include <ActiveQt/QAxWidget>
              #include <QAxObject>

              ...

              QAxObject *excel = new QAxObject( "Excel.Application", 0 );@
              Where is the problem?

              Can i make this program in MainWindow?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sportlover
                wrote on last edited by
                #7

                How should we know where your problem is?
                You do not even tell us what your problem is!

                If you want to, you can put all code in MainWindow.
                If it is correct to do so, is another question.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kingsta
                  wrote on last edited by
                  #8

                  [quote author="NL - Danny" date="1363988058"]How should we know where your problem is?
                  You do not even tell us what your problem is!

                  If you want to, you can put all code in MainWindow.
                  If it is correct to do so, is another question. [/quote]

                  I guess You show the error when compile that code. I got errors below.

                  error: undefined reference to QAxObject::QAxObject(QString const&, QObject*)' error: undefined reference to QAxObject::QAxObject(QString const&, QObject*)'
                  error: collect2: ld returned 1 exit status

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sportlover
                    wrote on last edited by
                    #9

                    Library can not be found.
                    I do not know QAxObject but there is a container activeqt, so maybe it should be added to the QT field in the pro file? Have you included the correct header?

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kingsta
                      wrote on last edited by
                      #10

                      You definitely right. The problem occurs because of library.

                      I add the pro file the code which is below. The problem is solved.
                      @CONFIG += qaxcontainer@

                      I can open, save, load Excel files now. There are a kind of functions which are strange with Qt. For example when I want to write B1 Cell to 5 (int);

                      @
                      ...
                      QAxObject *range1 = worksheet->querySubObject("Range(B1)");
                      range1->setProperty("Value", QVariant(5));@

                      setProperty() ,Property(), dynamicCall() functions belong Excel API? Should I learn that functions in MSDN?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        sportlover
                        wrote on last edited by
                        #11

                        No, the functions you mention belong to QObject / QAxBase.

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          kingsta
                          wrote on last edited by
                          #12

                          I see. Thanks for help guys. I did the what I want :)

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved