1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-16 04:42:53 +08:00
QXlsx/csv/main.cpp
2024-08-08 16:57:05 +09:00

45 lines
814 B
C++

// main.cpp
#include <iostream>
// using namespace std;
#include <QCoreApplication>
#include <QDebug>
#include <QVariant>
#include <QVector>
#include <QtCore>
#include <QtGlobal>
#include "xlsxcellrange.h"
#include "xlsxchart.h"
#include "xlsxchartsheet.h"
#include "xlsxdocument.h"
#include "xlsxrichstring.h"
#include "xlsxworkbook.h"
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
{
using namespace QXlsx;
QString xlsxFileName = ":/test.xlsx";
QXlsx::Document xlsxDoc(xlsxFileName);
if (!xlsxDoc.isLoadPackage()) {
return 0; // failed to load
}
QString csvFileName = "hello.csv";
if ( xlsxDoc.saveAsCsv(csvFileName) ){
qDebug() << "save as csv file";
}
}
return 0;
}