1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-16 04:42:53 +08:00
2017-11-11 18:20:45 +09:00
2017-10-21 16:40:44 +09:00
2017-11-11 18:20:45 +09:00
2017-10-21 16:23:02 +09:00
2017-10-28 19:54:12 +09:00
2017-08-16 20:12:15 +09:00
2017-10-05 13:42:55 +09:00
2017-11-10 23:17:09 +09:00
2017-11-10 23:14:27 +09:00

QXlsx

Read this in other languages: English, 한국어

Excel reader/writer library

  • QXlsx is excel file(*.xlsx) reader/writer library.
  • It is written for static library using Qt 5.

License

Hello excel

Writing excel file

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'

Reading excel file

Document xlsx("Test.xlsx"); // load excel file
if (!xlsx.isLoadPackage()) { // failed to load excel 		
	return;
}
int row = 1; int col = 2;
Cell* cell = xlsx.cellAt(row, col); // get cell pointer. (row is 1. column is 2.)
if ( cell == NULL )
	continue; // cell vaule is not set
QVariant var = cell->readValue(); // read cell value (number(double), QDateTime, QString ...)
qint32 styleNo = cell->styleNumber(); // read cell style number
if ( styleNo >= 0 )
	qDebug() << row << " " << var << " , style:" << styleNo;
else
	qDebug() << row << " " << var;

How to build

Test environment

To test

The following tests should be performed.

  • testing Microsoft Office(Excel) Online
  • testing Google Docs(Spreadsheet)
  • testing LibreOffice

Contact

  • j2doll@gmail.com
  • Hi! My native language is not English. My English is not fluent. Please use EASY English. :-)
Description
No description provided
Readme MIT 9.4 MiB
Languages
C++ 76.5%
C 20.3%
QMake 1.7%
CMake 1.3%
QML 0.1%