QXlsx-master

所属分类:Windows编程
开发工具:C/C++
文件大小:246KB
下载次数:12
上传日期:2018-09-03 01:06:40
上 传 者紫气东来~Qt
说明:  Qt数据导出到Excel的代码,本人在项目中用过。
(The Qt data is exported to the Excel code.)

文件列表:
HelloExcel (0, 2017-12-08)
HelloExcel\HelloExcel.pro (2188, 2017-12-08)
HelloExcel\UseQXlsx.pri (4634, 2017-12-08)
HelloExcel\calendar.cpp (7035, 2017-12-08)
HelloExcel\chart.cpp (2550, 2017-12-08)
HelloExcel\chartsheet.cpp (743, 2017-12-08)
HelloExcel\datavalidation.cpp (595, 2017-12-08)
HelloExcel\definename.cpp (871, 2017-12-08)
HelloExcel\demo.cpp (11206, 2017-12-08)
HelloExcel\documentproperty.cpp (771, 2017-12-08)
HelloExcel\extractdata.cpp (1029, 2017-12-08)
HelloExcel\formulas.cpp (3004, 2017-12-08)
HelloExcel\google-spreadsheet.xlsx (3956, 2017-12-08)
HelloExcel\hello.cpp (8230, 2017-12-08)
HelloExcel\hyperlinks.cpp (550, 2017-12-08)
HelloExcel\image.cpp (369, 2017-12-08)
HelloExcel\main.cpp (2157, 2017-12-08)
HelloExcel\mergecells.cpp (563, 2017-12-08)
HelloExcel\ms-number.xlsx (8895, 2017-12-08)
HelloExcel\numberformat.cpp (1231, 2017-12-08)
HelloExcel\readStyle.cpp (6260, 2017-12-08)
HelloExcel\richtext.cpp (950, 2017-12-08)
HelloExcel\rowcolumn.cpp (1064, 2017-12-08)
HelloExcel\style.cpp (1447, 2017-12-08)
HelloExcel\worksheetoperations.cpp (1438, 2017-12-08)
LICENSE (34667, 2017-12-08)
QXlsx (0, 2017-12-08)
QXlsx\QXlsx.pro (5026, 2017-12-08)
QXlsx\header (0, 2017-12-08)
QXlsx\header\xlsxabstractooxmlfile.h (2278, 2017-12-08)
QXlsx\header\xlsxabstractooxmlfile_p.h (2236, 2017-12-08)
QXlsx\header\xlsxabstractsheet.h (2560, 2017-12-08)
QXlsx\header\xlsxabstractsheet_p.h (2188, 2017-12-08)
QXlsx\header\xlsxcell.h (2973, 2017-12-08)
QXlsx\header\xlsxcell_p.h (1538, 2017-12-08)
QXlsx\header\xlsxcellformula.h (2666, 2017-12-08)
QXlsx\header\xlsxcellformula_p.h (2242, 2017-12-08)
QXlsx\header\xlsxcellrange.h (3321, 2017-12-08)
... ...

# QXlsx > *Read this in other languages: [English](README.md), [](README.ko.md)* ![](etc/IMG_0016.PNG) ## Excel reader/writer library * QXlsx is excel file(*.xlsx) reader/writer library. * It is written for static library using Qt 5. ## License * QXlsx is licensed under the GPL License https://www.gnu.org/licenses/gpl-3.0.en.html * QtXlsx Debao Zhang(2014) : https://github.com/dbzhang800/QtXlsxWriter * Qt License (see Qt Company site) : https://www.qt.io/ ## Hello excel ### Writing excel file ```cpp 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 ```cpp 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 * see https://github.com/j2doll/QXlsx/wiki ## Test environment * see https://github.com/j2doll/QXlsx/wiki/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](mailto:j2doll@gmail.com) * Hi! My native language is not English. My English is not fluent. Please use EASY English. :-)

近期下载者

相关文件


收藏者