Solved QAxobject how to delete EXCEL ?
-
How can I use QAxobject to delete the rows of excel sheet1.
Thanks for your reply for the question. Thank you! -
@pyuxing
Qt'sQAxObject
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. -
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");
-
@pyuxing
That looks OK. Suggest you rename that variable tofirst_row
, because that's what is.