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. QAxObject and Excel
Forum Updated to NodeBB v4.3 + New Features

QAxObject and Excel

Scheduled Pinned Locked Moved Unsolved General and Desktop
29 Posts 9 Posters 11.3k 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.
  • Ketan__Patel__0011K Ketan__Patel__0011

    @JonB

    So Should I Delete My Post ?

    JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by JonB
    #18

    @Ketan__Patel__0011
    Noooo!!! Not at all, I am saying your post is very useful. Maybe not to this OP, but potentially anyway to others. It is a good post :)

    1 Reply Last reply
    0
    • Ketan__Patel__0011K Ketan__Patel__0011

      @JonB

      So Should I Delete My Post ?

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #19

      hi
      @Ketan__Patel__0011 said in QAxObject and Excel:

      So Should I Delete My Post ?

      No, don't delete, i belive the OP is able to chose the right solution for what he needs

      Ketan__Patel__0011K 1 Reply Last reply
      0
      • ODБOïO ODБOï

        hi
        @Ketan__Patel__0011 said in QAxObject and Excel:

        So Should I Delete My Post ?

        No, don't delete, i belive the OP is able to chose the right solution for what he needs

        Ketan__Patel__0011K Offline
        Ketan__Patel__0011K Offline
        Ketan__Patel__0011
        wrote on last edited by
        #20

        @LeLev

        Okay i will Restore The Post

        Sorry To Say But What Is Meaning Of

        @LeLev said in QAxObject and Excel:

        OP
        ?

        JonBJ ODБOïO 2 Replies Last reply
        0
        • Ketan__Patel__0011K Ketan__Patel__0011

          @LeLev

          Okay i will Restore The Post

          Sorry To Say But What Is Meaning Of

          @LeLev said in QAxObject and Excel:

          OP
          ?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #21

          @Ketan__Patel__0011
          I didn't see you had actually deleted your useful post! Yes, please do restore it!

          OP == "Original Poster", the person who starts a thread.

          Ketan__Patel__0011K 1 Reply Last reply
          0
          • Ketan__Patel__0011K Ketan__Patel__0011

            @LeLev

            Okay i will Restore The Post

            Sorry To Say But What Is Meaning Of

            @LeLev said in QAxObject and Excel:

            OP
            ?

            ODБOïO Offline
            ODБOïO Offline
            ODБOï
            wrote on last edited by
            #22

            @Ketan__Patel__0011 the person who created this thread, (Original Poster )

            Ketan__Patel__0011K 1 Reply Last reply
            0
            • ODБOïO ODБOï

              @Ketan__Patel__0011 the person who created this thread, (Original Poster )

              Ketan__Patel__0011K Offline
              Ketan__Patel__0011K Offline
              Ketan__Patel__0011
              wrote on last edited by
              #23

              @LeLev

              Okay i got it Thank You

              1 Reply Last reply
              0
              • JonBJ JonB

                @Ketan__Patel__0011
                I didn't see you had actually deleted your useful post! Yes, please do restore it!

                OP == "Original Poster", the person who starts a thread.

                Ketan__Patel__0011K Offline
                Ketan__Patel__0011K Offline
                Ketan__Patel__0011
                wrote on last edited by
                #24

                @JonB

                I Restored it

                1 Reply Last reply
                1
                • Ketan__Patel__0011K Ketan__Patel__0011

                  If you want to read any excel file then use QSqlDatabase For It

                  my personal experience saying that QAxObject take Lot's of time for read any kind of Excel file
                  And QAxObject Very complicated Concept

                  you can see my code for Read Any Kind Of Excel File

                  QSqlDatabase db = QSqlDatabase::addDatabase("QODBC", "xlsx_connection");
                      db.setDatabaseName("DRIVER={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + QString(FilePath) + "");
                      if(db.open())
                          qDebug() << "Excel Is Connected";
                      else
                          qDebug() << "Excel Is Not Connected";
                  
                      QSqlQuery query(db);
                      query.prepare("SELECT * FROM [" + QString("Sheet1") + "$]"); // Select range, place A1:B5 after $
                      if(query.exec())
                      {
                          while (query.next())
                          {
                                     ///// Your Code
                          }
                      }
                  

                  for this You must have to Install Mysql Driver For Excel

                  M Offline
                  M Offline
                  Morteza_Mahmoudi
                  wrote on last edited by
                  #25

                  @Ketan__Patel__0011 I agree with you. AxObject is very slow especially in Save Data.

                  Ketan__Patel__0011K 1 Reply Last reply
                  0
                  • M Morteza_Mahmoudi

                    @Ketan__Patel__0011 I agree with you. AxObject is very slow especially in Save Data.

                    Ketan__Patel__0011K Offline
                    Ketan__Patel__0011K Offline
                    Ketan__Patel__0011
                    wrote on last edited by
                    #26

                    @Morteza_Mahmoudi

                    Happy To Help

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      Koru
                      wrote on last edited by
                      #27

                      Is it possible to get the cell's address using SQL/ODBC? I can get the column easily from

                      QSqlQuery::value
                      

                      but how to obtain the row's number?

                      JonBJ 1 Reply Last reply
                      0
                      • K Koru

                        Is it possible to get the cell's address using SQL/ODBC? I can get the column easily from

                        QSqlQuery::value
                        

                        but how to obtain the row's number?

                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #28

                        @Koru I don't follow, could you give an example of what query you issue, how you get a column number and what you want to get for a row number?

                        K 1 Reply Last reply
                        0
                        • JonBJ JonB

                          @Koru I don't follow, could you give an example of what query you issue, how you get a column number and what you want to get for a row number?

                          K Offline
                          K Offline
                          Koru
                          wrote on last edited by
                          #29

                          @JonB, the query is actually irrelevant, I just need to get the cell's address. I have an application that validates columns and lists cells that have wrong values. The validation result is the address and a failure message so the user knows exactly where the error occurs and what has to be fixed directly in a checked file.
                          SQL/ODBC queries compare columns faster than QAxObjects, but results lack addresses. The addresses don't have to be in an Excel manner like A12 etc., it can be a row/column number from the sheet.

                          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