qt word表格几千上万hang,表格单元格合并太耗时了,有没有什么解决方法

word 表格合并单元格函数 Merge(QAxObject *)

void mergeCells(QAxObject *table, int nStartRow,int nStartCol,int nEndRow,int nEndCol){
    QAxObject* startCell =table->querySubObject("Cell(int, int)",nStartRow,nStartCol);
    QAxObject* endCell = table->querySubObject("Cell(int, int)",nEndRow,nEndCol);
    if(!startCell || !endCell)
        return;
        startCell->dynamicCall("Merge(QAxObject *)", endCell->asVariant());
}

合并2600行第一列到2610行第一列
合并一条数据大概耗时120ms(几万条合并就太慢了)
mergeCells(table, 2600, 1, 2610, 1);

https://blog.csdn.net/blackbattery/article/details/52013159?utm_source=blogxgwz2