ExcelExport.h 673 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef EXCELEXPORT_H
  2. #define EXCELEXPORT_H
  3. #include <ActiveQt/QAxObject>
  4. #include <QDir>
  5. #include <QFile>
  6. #include <qstring.h>
  7. class ExcelExport {
  8. public:
  9. ExcelExport();
  10. ~ExcelExport();
  11. void newExcel(const QString &fileName);
  12. void appendSheet(const QString &sheetName);
  13. void setCellValue(int row, int column, const QString &value);
  14. void setHeaderCellValue(int row, int column, const QString &value);
  15. void setCellValue(int row, int column, const int &value);
  16. void saveExcel(const QString &fileName);
  17. QAxObject *pApplication;
  18. QAxObject *pWorkBooks;
  19. QAxObject *pWorkBook;
  20. QAxObject *pSheets;
  21. QAxObject *pSheet;
  22. };
  23. #endif // EXCELEXPORT_H