#include "excelworker.h"
#include <QFile>
#include <QApplication>


ExcelWorker::ExcelWorker(QObject *parent) : QObject(parent)
{

}

ExcelWorker::~ExcelWorker()
{

}

/*ExcelWorker::read_xlsx_file()
{
    QString path=qApp->applicationDirPath()+"/code.xlsx";
    QFile file(path);
    if(!file.exists())
        qDebug("xlsx file do not exist!");
    else{
        QStringList code_nums;code_nums.clear();
        QStringList code_name;code_name.clear();
        QXlsx::Document xlsx(path);
        QXlsx::Workbook *workBook = xlsx.workbook();
        QXlsx::Worksheet *workSheet = static_cast<QXlsx::Worksheet*>(workBook->sheet(0));
        ulong xlsxrows=workSheet->dimension().rowCount();//读取文件行数
        ulong xlsxcloums=workSheet->dimension().columnCount();//读取文件列数
        for (int i=1;i<=xlsxrows;i++){
            code_nums.append(workSheet->cellAt(i, 1)->value().toString());
            code_name.append(workSheet->cellAt(i, 2)->value().toString());
        }
        code_nums.removeFirst();//去掉第一行标题行
        code_name.removeFirst();//去掉第一行标题行
        xlsx.deleteLater();
}
*/


