Congratulations to our 2022 Qt Champions!

Read data from MS Excel file that have a password using QtXlsx library

  • I'm using Qtxlsx Libary to read data from excel file found here but some of this files have a password and I have this passwords so is there any option to give this password to the library to start read the data from it?
    I use this code to read the data from the file

        using namespace QXlsx;
        QXlsx::Document xlsx("D:/Book1.xlsx");
        int row = xlsx.dimension().lastRow();
        int col = xlsx.dimension().lastColumn();
        qDebug() << "row = " << row << " " << " col = " << col;
        for (int i = 1; i <= row; i++) {
            for (int j = 1; j <= col; j++) {
                std::cout <<,j).toString().toStdString() << " | ";
            std::cout << std::endl;

    is there something like


    to open the excel file and start read from it because if I read the data from excel file that have a password it give me this error

    QZip: not a zip file!

    so is there anyway to do that or a library to give it password and return an excel file without password or any solution
    Thanks in advance

  • Lifetime Qt Champion


    I dont think its supported
    See VSRonin post.

Log in to reply