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

test v3.1

This commit is contained in:
Look Skyworker 2017-10-09 21:08:32 +09:00
parent af6cdefdc4
commit 632cdd8f32
2 changed files with 49 additions and 27 deletions

View File

@ -3,14 +3,35 @@
> *Read this in other languages: [English](README.md), [한국어](README.ko.md)*
![](image/IMG_0016.PNG)
![](image/XLSX-64.png)
![](image/qt-64.png)
## 엑셀 읽기/쓰기 라이브러리
* QXlsx는 엑셀 파일(*.xlsx) 읽기/쓰기 라이브러리입니다.
* QXlsx는 Qt 5.x를 사용하는 정적 라이브러리로 제작되었습니다.
## 활용 예제 Hello excel
### 엑셀 파일 쓰기 예제
```cpp
QXlsx::Document xlsx;
xlsx.write("A1", "Hello Qt!");
xlsx.saveAs("Test.xlsx");
```
### 엑셀 파일 읽기 예제
```cpp
Cell* cell = xlsx.cellAt(1, 2); // row is 1. column is 2.
if ( cell == NULL )
continue; // cell vaule is not set
QVariant var = cell->readValue();
qint32 styleNo = cell->styleNumber();
if ( styleNo >= 0 )
qDebug() << row << " " << var << " , style:" << styleNo;
else
qDebug() << row << " " << var;
```
## 빌드하는 방법
참조: https://github.com/j2doll/QXlsx/wiki
## 테스트 환경
* Qt 5.9.1 (Visual Studio 2017/Windows 64bit)
* Qt 5.9.1 (Visual Studio 2017/Windows 32bit)
@ -22,20 +43,10 @@
* Qt 5.2.0 (Ubuntu 14/Linux x64)
* Qt 5.0.1 (MingW/Windows 32bit)
## 활용예제 Hello excel (엑셀 파일 쓰기)
```cpp
QXlsx::Document xlsx;
xlsx.write("A1", "Hello Qt!");
xlsx.saveAs("Test.xlsx");
```
## 빌드하는 방법
참조: https://github.com/j2doll/QXlsx/wiki
## 라이선스
* GPL License https://www.gnu.org/licenses/gpl-3.0.en.html
* The Qt Company : https://www.qt.io/developers/
* 최초 소스코드의 출처는 다음과 같습니다. Debao Zhang(2014) : https://github.com/dbzhang800/QtXlsxWriter
* GPL 라이선스 : https://www.gnu.org/licenses/gpl-3.0.en.html
* 최초 소스코드의 출처: Debao Zhang(2014) : https://github.com/dbzhang800/QtXlsxWriter
* Qt 라이선스는 Qt Company 싸이트 참조 : https://www.qt.io/developers/
## 문의
* https://github.com/j2doll

View File

@ -3,14 +3,35 @@
> *Read this in other languages: [English](README.md), [한국어](README.ko.md)*
![](image/IMG_0016.PNG)
![](image/XLSX-64.png)
![](image/qt-64.png)
## Excel reader/writer library
* QXlsx is excel file(*.xlsx) reader/writer library.
* It is written for static library using Qt 5.
## Hello excel
### Writing excel file
```cpp
QXlsx::Document xlsx;
xlsx.write("A1", "Hello Qt!");
xlsx.saveAs("Test.xlsx");
```
### Reading excel file
```cpp
Cell* cell = xlsx.cellAt(1, 2); // row is 1. column is 2.
if ( cell == NULL )
continue; // cell vaule is not set
QVariant var = cell->readValue();
qint32 styleNo = cell->styleNumber();
if ( styleNo >= 0 )
qDebug() << row << " " << var << " , style:" << styleNo;
else
qDebug() << row << " " << var;
```
## How to build
* see https://github.com/j2doll/QXlsx/wiki
## Test environment
* Qt 5.9.1 (Visual Studio 2017/Windows 64bit)
* Qt 5.9.1 (Visual Studio 2017/Windows 32bit)
@ -22,21 +43,11 @@
* Qt 5.2.0 (Ubuntu 14/Linux x64)
* Qt 5.0.1 (MingW/Windows 32bit)
## Hello excel (writing excel file)
```cpp
QXlsx::Document xlsx;
xlsx.write("A1", "Hello Qt!");
xlsx.saveAs("Test.xlsx");
```
## How to build
* see https://github.com/j2doll/QXlsx/wiki
## License
* GPL License https://www.gnu.org/licenses/gpl-3.0.en.html
* Original source code from Debao Zhang(2014) : https://github.com/dbzhang800/QtXlsxWriter
* Qt License (see Qt Company site) : https://www.qt.io/
## Contact
* [https://github.com/j2doll](https://github.com/j2doll)
* [j2doll@gmail.com](mailto:j2doll@gmail.com)
* Hi! My native language is not English. My English is not fluent. Please use EASY English. :-)