-
-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #345 from j2doll/j2doll/csv
- branch J2doll/csv - new function for saving as csv file format (testing now)
- Loading branch information
Showing
10 changed files
with
230 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# csv.pro | ||
|
||
TARGET = csv | ||
TEMPLATE = app | ||
|
||
QT += core | ||
QT += gui | ||
|
||
CONFIG += console | ||
CONFIG -= app_bundle | ||
|
||
# NOTE: You can fix value of QXlsx path of source code. | ||
# QXLSX_PARENTPATH=./ | ||
# QXLSX_HEADERPATH=./header/ | ||
# QXLSX_SOURCEPATH=./source/ | ||
include(../QXlsx/QXlsx.pri) | ||
|
||
########################################################################## | ||
# The following define makes your compiler emit warnings if you use | ||
# any feature of Qt which as been marked deprecated (the exact warnings | ||
# depend on your compiler). Please consult the documentation of the | ||
# deprecated API in order to know how to port your code away from it. | ||
DEFINES += QT_DEPRECATED_WARNINGS | ||
|
||
########################################################################## | ||
# You can also make your code fail to compile if you use deprecated APIs. | ||
# In order to do so, uncomment the following line. | ||
# You can also select to disable deprecated APIs only up to a certain | ||
# version of Qt. | ||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 | ||
# disables all the APIs deprecated before Qt 6.0.0 | ||
|
||
########################################################################## | ||
# source code | ||
|
||
SOURCES += \ | ||
main.cpp | ||
|
||
# RESOURCES += \ | ||
# test.qrc | ||
|
||
RESOURCES += \ | ||
test.qrc | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!DOCTYPE RCC> | ||
<RCC version="1.0"> | ||
<qresource> | ||
<file>test.xlsx</file> | ||
</qresource> | ||
</RCC> |
Binary file not shown.