You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Debao Zhang ede8c52f03 Introduce macros for namespace to make qdoc happy 11 years ago
examples Add basic document files 11 years ago
src Introduce macros for namespace to make qdoc happy 11 years ago
tests Fix issue 4: Fix background color of solid pattern 11 years ago
.gitignore Update .gitignore 11 years ago
.qmake.conf Refactor: Follow Qt5 module's file directories style 11 years ago
README.md Update the readme file 11 years ago
qtxlsx.pro Refactor: Follow Qt5 module's file directories style 11 years ago
sync.profile Refactor: Follow Qt5 module's file directories style 11 years ago

README.md

QtXlsx is a library that can write Excel files. It doesn't require Microsoft Excel and can be used in any platform that Qt5 supported.

Getting Started

Usage(1): Use source code directly

The package contains a qtxlsx.pri file that allows you to integrate the component into applications that use qmake for the build step.

  • Download the source code.

  • Put the source code in any directory you like. For example, 3rdparty:

    |-- project.pro
    |-- ....
    |-- 3rdparty\
    |     |-- qtxlsx\
    |     |
  • Add following line to your qmake project file:
    include(3rdparty/qtxlsx/src/xlsx/qtxlsx.pri)

Note: If you like, you can copy all files from src/xlsx to your application's source path. Then add following line to your project file:

    include(qtxlsx.pri)
  • Then, using Qt Xlsx in your code
    #include "xlsxdocument.h"
    int main()
    {
        QXlsx::Document xlsx;
        xlsx.write("A1", "Hello Qt!");
        xlsx.saveAs("Test.xlsx");
        return 0;
    }

Usage(2): Use Xlsx as Qt5's addon module

Note: Perl is needed.

  • Download the source code.

  • Put the source code in any directory you like. At the toplevel directory run

    qmake
    make
    make install

The library, the header files, and the feature file will be installed to your system.

  • Add following line to your qmake's project file:
    QT += xlsx
  • Then, using Qt Xlsx in your code

References