12345678910111213141516171819202122232425262728293031323334 |
- #ifndef EXCELAPI_H
- #define EXCELAPI_H
- #include <string>
- 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
|