1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-02-06 05:08:22 +08:00

Merge branch 'dev'

This commit is contained in:
Look Skyworker 2018-06-02 12:38:04 +09:00
commit 10e554bb60
4 changed files with 141 additions and 41 deletions

132
HowToSetProject.ko.md Normal file
View File

@ -0,0 +1,132 @@
## QXlsx 프로젝트 설정하는 방법
> *Read this in other languages: [English](HowToSetProject.md), :kr: [한국어](HowToSetProject.ko.md)*
- QXlsx를 적용하는 쉬운 방법은 다음과 같습니다.
- Windows에 적용하는 방법을 설명합니다.
- Linux 또는 Mac에 적용하는 방법도 비슷하므로 추가 요청이 있으면 도움을 요청할 것입니다.
## 설정 단계
:one: github에서 소스 코드를 clone 합니다
```sh
git clone https://github.com/j2doll/QXlsx.git
```
![](markdown.data/01.jpg)
<br /><br />
:two: QtCreator를 실행합니다
![](markdown.data/02.jpg)
* QtCreator의 사용방법을 모르시면, Qt Company 싸이트를 참조하세요. [https://www.qt.io/qt-features-libraries-apis-tools-and-ide/](https://www.qt.io/qt-features-libraries-apis-tools-and-ide/)
<br /><br />
:three: 여러분의 Qt 프로젝트를 생성하세요
![](markdown.data/03.jpg)
<br /><br />
:four: 예제는 콘솔 어플리케이션입니다
![](markdown.data/04.jpg)
<br /><br />
:five: 프로젝트 이름을 정하세요. 현재 프로젝트 이름은 HelloQXlsx 입니다.
![](markdown.data/05.jpg)
<br /><br />
:six: HelloQXlsx 프로젝트가 생성되었습니다
![](markdown.data/06.jpg)
<br /><br />
:seven: 현재 경로
![](markdown.data/07.jpg)
<br /><br />
:eight: QXlsx 코드를 여러분의 Qt 프로젝트에 복사하세요. (윈도우즈 탐색기로 복사하셔도 됩니다)
![](markdown.data/08.jpg)
```cmd
xcopy c:\workspace\github\QXlsx\QXlsx c:\workspace\HelloQXlsx /s /e
```
<br /><br />
:nine: 현재 디렉토리 및 파일들
![](markdown.data/09.jpg)
<br /><br />
:keycap_ten: 여러분의 Qt 프로젝트(*.pro)에 QXlsx 코드를 추가하세요
![](markdown.data/10.jpg)
```qmake
# QXlsx code for Application Qt project
QXLSX_PARENTPATH=./ # current QXlsx path is . (. means curret directory)
QXLSX_HEADERPATH=./header/ # current QXlsx header path is ./header/
QXLSX_SOURCEPATH=./source/ # current QXlsx source path is ./source/
include(./QXlsx.pri)
```
<br /><br />
:one::one: 헤더 파일과 네임스페이스를 설정하세요. 그리고 예제를 위한 코드를 추가하세요
![](markdown.data/11.jpg)
```cpp
// main.cpp
#include <QCoreApplication>
#include "xlsxdocument.h"
#include "xlsxchartsheet.h"
#include "xlsxcellrange.h"
#include "xlsxchart.h"
#include "xlsxrichstring.h"
#include "xlsxworkbook.h"
using namespace QXlsx;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QXlsx::Document xlsx;
xlsx.write("A1", "Hello Qt!"); // write "Hello Qt!" to cell(A,1). it's shared string.
xlsx.saveAs("Test.xlsx"); // save the document as 'Test.xlsx'
return 0;
// return a.exec();
}
```
<br /><br />
:one::two: 프로젝트를 빌드하고 실행하세요
![](markdown.data/12.jpg)
<br /><br />
:one::three: 실행 파일(*.exe)과 엑셀 파일(*.xlsx) 파일이 생성되었습니다
![](markdown.data/13.jpg)
<br /><br />

View File

@ -1,6 +1,8 @@
## How to setup QXlsx project
> *Read this in other languages: [English](HowToSetProject.md), :kr: [한국어](HowToSetProject.ko.md)*
- Here's an easy way to apply QXlsx.
- Describes when to apply to Windows.
- The method of applying it on Linux or Mac is similar, and I will write help if there is an additional request.
@ -72,7 +74,7 @@ xcopy c:\workspace\github\QXlsx\QXlsx c:\workspace\HelloQXlsx /s /e
<br /><br />
10. Append code for QXlxs library on your Qt project(*.pro)
:keycap_ten: Append code for QXlxs library on your Qt project(*.pro)
![](markdown.data/10.jpg)
@ -86,7 +88,7 @@ include(./QXlsx.pri)
<br /><br />
11. Set heaer files and namespace for sample. Then append hello world code.
:one::one: Set heaer files and namespace for sample. Then append hello world code.
![](markdown.data/11.jpg)
@ -118,13 +120,13 @@ int main(int argc, char *argv[])
<br /><br />
12. Build and Run a project
:one::two: Build and Run a project
![](markdown.data/12.jpg)
<br /><br />
13. Execute file and Excel file(xlsx) is created.
:one::three: A execute file(*.exe) and a excel file(xlsx) is created.
![](markdown.data/13.jpg)

View File

@ -44,42 +44,8 @@ else
qDebug() << row << " " << var;
```
## 빌드하는 방법
* :one: Qt 5 설치. [Qt Company](https://www.qt.io) (2017-)
* :two: github 소스 코드 클론
```sh
git clone https://github.com/j2doll/QXlsx.git
```
* :three: QXlsx 프로젝트 빌드
```sh
cd QXlsx
qmake QXlsx.pro
make debug (you may use 'make release'.)
```
* :four: TestExcel 빌드
```sh
cd TestExcel
qmake TestExcel.pro
make
```
* :five: TestExcel 실행
```sh
./TestExcel
```
* :pushpin: 자신만의 Qt 프로젝트를 위한 QXlsx.pri 를 include 하고 QXlsx 경로값을 설정하세요.
```qmake
# default relative path (you may not set this value. then default value will be used.)
QXLSX_PARENTPATH=./
QXLSX_HEADERPATH=./header/
QXLSX_SOURCEPATH=./source/
# abs. directory sample
# QXLSX_PARENTPATH=/hello/world/
# QXLSX_HEADERPATH=/hello/world/header/
# QXLSX_SOURCEPATH=/hello/world/source/
include(../QXlsx/QXlsx.pri)
```
## 설정하는 방법
* [QXlsx 프로젝트 설정하는 방법](HowToSetProject.ko.md)을 참조하세요.
## 테스트 환경
테스트된 환경은 다음과 같습니다.

View File

@ -44,7 +44,7 @@ else
qDebug() << row << " " << var;
```
## How to build
## How to set up
* See [How to setup QXlsx project](HowToSetProject.md)
## Test environment