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 how to delete EXCEL ?
Forum Updated to NodeBB v4.3 + New Features

QAxobject how to delete EXCEL ?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.0k Views
  • 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.
  • pyuxingP Offline
    pyuxingP Offline
    pyuxing
    wrote on last edited by pyuxing
    #1

    How can I use QAxobject to delete the rows of excel sheet1.0_1535119807004_screenshot.PNG
    Thanks for your reply for the question. Thank you!

    JonBJ 1 Reply Last reply
    0
    • pyuxingP pyuxing

      How can I use QAxobject to delete the rows of excel sheet1.0_1535119807004_screenshot.PNG
      Thanks for your reply for the question. Thank you!

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

      @pyuxing
      Qt's QAxObject is just a wrapper around the Excel COM object. What you then do is nothing to do with Qt, you need to read the Excel Automation documentation (in this case for "delete row") or ask in a suitable forum for that. Something like https://forum.qt.io/topic/89536/qaxobject-and-excel will give you a start as to what code will look like.

      1 Reply Last reply
      2
      • pyuxingP Offline
        pyuxingP Offline
        pyuxing
        wrote on last edited by
        #3

        I do like this,and have solved the problem.
        Thanks for you again.

        QAxObject *first_sheet = excel.querySubObject("Rows(int)", 1);
        first_sheet->dynamicCall("delete");
        
        JonBJ 1 Reply Last reply
        0
        • pyuxingP pyuxing

          I do like this,and have solved the problem.
          Thanks for you again.

          QAxObject *first_sheet = excel.querySubObject("Rows(int)", 1);
          first_sheet->dynamicCall("delete");
          
          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @pyuxing
          That looks OK. Suggest you rename that variable to first_row, because that's what is.

          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