其他分享
首页 > 其他分享> > QAxBase: Error calling IDispatch member LineStyle: Unknown error

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); //不显示边框
    }

 

标签:IDispatch,int,Unknown,QAxBase,dynamicCall,边框,报错,SetLineStyle,borders
来源: https://www.cnblogs.com/azbane/p/11968961.html