32 lines
754 B
C++
32 lines
754 B
C++
#ifndef BF_XLNT_H
|
|
#define BF_XLNT_H
|
|
|
|
#include <unordered_map>
|
|
#include <xlnt/xlnt.hpp>
|
|
|
|
#include "bf.config.h"
|
|
#include "bf.request.h"
|
|
#include "bf.util.h"
|
|
|
|
class BF_Xlnt
|
|
{
|
|
public:
|
|
BF_Xlnt() = default;
|
|
|
|
public:
|
|
void Reset();
|
|
void Set(BF_Interface* request, std::shared_ptr<BF_Config> bfConfig);
|
|
bool parseXlsx(const std::string& file, std::vector<XlsxTask>& tasks, const std::string& sheetName);
|
|
|
|
private:
|
|
bool Fanyi(int i, int j, xlnt::worksheet& ws, const XlsxTask& task, std::string& out);
|
|
bool GetCell(int i, int j, xlnt::worksheet& ws, xlnt::cell_reference& out);
|
|
|
|
private:
|
|
BF_Interface* request_{};
|
|
std::shared_ptr<BF_Config> bfConfig_{};
|
|
|
|
std::unordered_map<std::string, std::string> fanyiHistory_{};
|
|
};
|
|
|
|
#endif |