#include <QObject>
class SingleTestResult
{
public:
QString testName;
QList<QList<QVariant>> Data;
};
class TestRecordExporter : public QObject
{
Q_OBJECT
public:
TestRecordExporter(QObject *parent = 0);
~TestRecordExporter();
bool writeToFile(QString savePath, QList<SingleTestResult> &data);
private:
bool writeToSheet(QList<QList<QVariant>> &data, class QAxObject *worksheet);
void convertToColName(int data, QString &res);
QString to26AlphabetString(int data);
void castListListVariant2Variant(QVariant &var, const QList<QList<QVariant> > &res);
private:
};
#include <QAxObject>
#include <QDebug>
#include <QElapsedTimer>
#include <QMessageBox>
TestRecordExporter::TestRecordExporter(QObject *parent)
: QObject(parent)
{
}
Test