QAxBase: Error calling IDispatch member LineStyle: Unknown error

word/Excel版本2007、2010。  wps也适用。

//borders->dynamicCall("SetLineStyle(int,int,int)", 0, 0, 1); //报错
borders->dynamicCall("SetLineStyle(int)", 0);  //不报错--不显示边框
borders->dynamicCall("SetLineStyle(int)", 1);  //显示边框
    //设置表格边框
    for (int i=1;i<=6;i++)
    {
        QString m_str = QString("Borders(-%1)").arg(i);
        QAxObject *borders = table->querySubObject(m_str.toLatin1().constData());
        borders->dynamicCall("SetLineStyle(int)", 0); //不显示边框
    }
原文地址:https://www.cnblogs.com/azbane/p/11968961.html