Results 1 to 1 of 1

Thread: [QAxObject] Excel export

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2017
    Posts
    58
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default [QAxObject] Excel export

    Hello,
    I'm using an excel class from https://forum.qt.io/topic/16547/how-...excel-in-qt/10 - it works fine (reading from file). Now I need to delete every 2nd row in file, but I have no idea, how to do it. I can't find which arguments accept dynamicCall/querySubOject/etc.

    Thanks for any help!

    edit:
    OK, I think, this works:
    Qt Code:
    1. m_sheet = m_sheets->querySubObject( "Item( int )", 1);
    2. QAxObject* usedrange = m_sheet->querySubObject( "UsedRange");
    3. QAxObject * rows = usedrange->querySubObject("Rows");
    4. int intRows = rows->property("Count").toInt();
    5.  
    6. for(int row=24; row<50; row++)
    7. {
    8. QAxObject *qRow = m_sheet->querySubObject("Rows(int)", row);
    9. qRow->dynamicCall("Delete");
    10. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by ado130; 19th March 2017 at 18:23.

Similar Threads

  1. QAxObject probelm for Write the Excel
    By anh5kor in forum Newbie
    Replies: 3
    Last Post: 3rd March 2016, 17:54
  2. export my sql table to an excel file
    By achraf1194 in forum General Programming
    Replies: 1
    Last Post: 22nd October 2015, 15:10
  3. QAxObject Importing Excel named ranges using MS Query
    By simonb in forum Qt Programming
    Replies: 0
    Last Post: 24th July 2012, 09:45
  4. Can't save excel file with QaxObject
    By Mirmilstein in forum Qt Programming
    Replies: 3
    Last Post: 2nd April 2012, 10:05
  5. Trying to export to Excel
    By ShamusVW in forum Qt Programming
    Replies: 7
    Last Post: 4th August 2010, 09:07

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.