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:
m_sheet = m_sheets->querySubObject( "Item( int )", 1);
QAxObject* usedrange
= m_sheet
->querySubObject
( "UsedRange");
QAxObject * rows
= usedrange
->querySubObject
("Rows");
int intRows = rows->property("Count").toInt();
for(int row=24; row<50; row++)
{
QAxObject *qRow
= m_sheet
->querySubObject
("Rows(int)", row
);
qRow->dynamicCall("Delete");
}
m_sheet = m_sheets->querySubObject( "Item( int )", 1);
QAxObject* usedrange = m_sheet->querySubObject( "UsedRange");
QAxObject * rows = usedrange->querySubObject("Rows");
int intRows = rows->property("Count").toInt();
for(int row=24; row<50; row++)
{
QAxObject *qRow = m_sheet->querySubObject("Rows(int)", row);
qRow->dynamicCall("Delete");
}
To copy to clipboard, switch view to plain text mode
Bookmarks