Important: Please read the Qt Code of Conduct -

How to use insert row in Qtxlsx. Please Help me

  • How to use insert row in Qtxlsx ? I didnt find this function so I ask your .
    Please help me.

  • @VRonin
    Aleady, I see that.
    So, I dont insert row? Just, Handling this lib source?

  • Assuming you want to show on the screen in the tableview.

    In this example I used QStandardItemModel:

    QXlsx::Document excel(filename);
     int row=excel.dimension().firstRow();
     while(row != excel.dimension().lastRow())
           for(int col=0; col < excel.dimension().columnCount(); ++col)
                setValueAt(row, col,, col).value<QString>());
    void QExcelView::setValueAt(int row, int col, const QString &value)
            mModel->setItem(row, col, new QStandardItem(value));
            mModel->item(row, col)->setText(value);

Log in to reply