#ifndef EXCELAPI_H #define EXCELAPI_H #include typedef void * (*OpenxlsxFunction)(std::string strfilepath); typedef int (*getcellvalueFunction)(void * pxlsxhanle,unsigned int column,unsigned int row,std::string & strvalue); typedef void (*ClosexlsxFunction)(void * pxlsxhanle); class ExcelAPI { public: ExcelAPI(); static ExcelAPI & Inst(); bool IsLoad(); public: void * Openxlsx(std::string strfilepath); int getcellvalue(void * pxlsxhanle,unsigned int column,unsigned int row,std::string & strvalue); void Closexlsx(void * pxlsxhanle); private: bool mbLoad = false; OpenxlsxFunction mOpenxlsx; getcellvalueFunction mgetcellvalue; ClosexlsxFunction mClosexlsx; }; #define ServiceExcelAPI ExcelAPI::Inst() #endif // EXCELAPI_H