You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/iData/iFileEngine/iFileEngineExcel.h

39 lines
831 B
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "Defines.h"
#include "iFileEngine.h"
#include "iFileEngine_global.h"
// Excel格式文件加载解析引擎
class I_FILE_ENGINE_EXPORT iFileEngineExcel : public iFileEngine
{
public:
iFileEngineExcel();
~iFileEngineExcel();
public:
void setSheet(QString sSheet);
virtual bool load(VVecVariant& vvecData, QString sFile);
static bool getAllSheets(QString sFile, QStringList& list);
protected:
// 尝试对名称和单位的模糊解析
virtual bool tryParse(VVecVariant& vvec);
// 利用倒回两行try查找标题单位
//
virtual bool tryParseTitleUnit(const VecVariant& vec);
virtual bool tryParseTitle(const VecVariant& vec);
// 判断改行是否全是数字
bool isDigitLine(const VecVariant& vec);
protected:
QString m_sSheet;
};