Library / SDK
QtExcel/QXlsx avatar
QtExcel/QXlsx

QtExcel/QXlsx: Qt Integration for XLSX Reading and Writing

Excel file(*.xlsx) reader/writer library using Qt. Descendant of QtXlsxWriter.

1,533 stars433 forksC++MIT

At a glance

What is it?
QXlsx is a C++ library for reading and writing Excel `.xlsx` files in Qt applications, descended from the unsupported QtXlsxWriter project. It supports qmake and CMake integration, with static or dynamic library use described by the project.
Who is it for?
Adopt QXlsx when a Qt application needs a direct C++ library boundary for `.xlsx` reading and writing and your build can follow its qmake or CMake setup. Do not choose it for Excel formats other than `.xlsx`, or when you require a fully documented Excel feature set beyond the examples and project documentation.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 59 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Why QXlsx Exists for Qt Applications

QXlsx addresses a specific gap between a Qt application and the `.xlsx` file format. It is a C++ library that uses Qt and provides Excel file reading and writing, so an application can work with spreadsheet data without treating the spreadsheet file as an unrelated desktop format. The README describes the project as a descendant of QtXlsxWriter, created because QtXlsxWriter was no longer supported. That history explains the library's positioning, but it also means QXlsx is not simply a new name for a maintained QtXlsxWriter release. It is a separate project with its own repository, examples, setup guides, releases, and issue discussion.

The intended audience is developers building Qt applications in C++ that need to generate or consume `.xlsx` files. The repository contains examples such as `HelloWorld`, `ExcelViewer`, `ExcelTableEditor`, `ReadColor`, `WhatType`, `LargeData`, and `WebServer`. These names indicate several practical application contexts represented in the source tree, although the README does not provide a complete feature matrix for each one. Developers should inspect the examples relevant to their own file size, display, and application architecture rather than assuming that every sample uses the same API or build configuration.

What QXlsx Changes in the Qt Build

The repository supports two documented project setup paths: `HowToSetProject.md` for qmake and `HowToSetProject-cmake.md` for CMake. That distinction matters because Qt projects commonly originate in either build system. QXlsx does not require one exclusive integration style in its README. The documentation also states that users do not need to use a static library or a dynamic shared object with QXlsx, and that a static library is possible. This gives the adopter a choice about how the code is incorporated into the application build.

Based on the repository layout, QXlsx itself is the library directory, while the other top-level directories are mostly examples or feature-oriented applications. The examples therefore serve as concrete references for connecting the library to a Qt project. The README does not include a universal `CMakeLists.txt` snippet or qmake project file in its main text, so a complete install tutorial cannot be copied from the README without inventing details. The correct first step is to open the setup document matching the project's build system.

That limitation is not necessarily a blocker for an experienced Qt developer, but it makes the project less self-contained from the README alone. Library availability, module paths, compiler settings, and deployment decisions need to be checked in the setup guide and in the examples for the selected release.

Reading and Writing XLSX Through QXlsx

The documented capability is concise: QXlsx is an Excel file, or `.xlsx`, reader and writer library. The examples directory adds evidence of the kinds of application flows represented by the repository. `ExcelViewer` suggests a viewing application, `ExcelTableEditor` suggests spreadsheet editing, and `LargeData` suggests a separate concern around larger files. `WhatType`, `ReadColor`, `DateTime`, and `FormulaDump` indicate that the repository includes examples or areas associated with inspecting spreadsheet content, reading formatting, handling dates and times, and examining formulas.

The README does not document the internal file-processing architecture, supported worksheet features, chart support, merged-cell behavior, or compatibility guarantees. Those details should not be inferred from example directory names. The safe design assumption is that QXlsx exposes C++ and Qt-facing APIs for `.xlsx` input and output, while the exact call sequence must be read from `Example.md` and the relevant example source.

For a new application, the most useful first use is to compare the smallest example with the desired operation. Start with opening or creating a workbook, then add the specific spreadsheet behavior the application needs, such as reading a cell, writing a value, or displaying data. This incremental approach reduces the number of unconfirmed assumptions, especially when the requirement involves formatting or formulas.

A Short Setup and First-Use Tutorial

QXlsx's README does not provide an inline installation command, package name, version pin, or copy-ready first example. Instead, it directs users to the setup documents and to `Example.md`. Because the instruction is not to invent missing commands, this tutorial stops at the documented route. First, clone or obtain the repository from the project link, then open `HowToSetProject.md` if the application uses qmake, or `HowToSetProject-cmake.md` if it uses CMake. The README also links to the examples and wiki for API usage.

The next documented reference is `Example.md`. Select an example that matches the intended operation, then copy its project configuration and QXlsx calls into a small Qt application. A first review should identify the library target, include path or module declaration, source files, and the exact workbook operation being performed. Those items must come from the relevant project file because the README does not state them.

The README does not document rollback, deployment, migration from another spreadsheet library, or a one-command installation. It also does not say whether a particular spreadsheet feature is guaranteed. This makes the setup guides and examples the authoritative project-specific references for the first build.

Trade-offs Against Other Qt Spreadsheet Options

QXlsx is not the only option named by the repository. The README identifies Qxlnt as a helper project that allows `xlnt` to be used in Qt, while describing `xlnt` as a C++ library for `.xlsx` files. It identifies Qlibxlsxwriter as a helper for `libxlsxwriter`, a C library for creating Excel `.xlsx` files. It also lists QSimpleXlsxWriter, described as a C++ library for creating `.xlsx` files for Microsoft Excel 2007 and above.

The difference in approach is visible in these descriptions. QXlsx is itself presented as the reader and writer library using Qt, descended from QtXlsxWriter. Qxlnt connects the separate `xlnt` library to Qt. Qlibxlsxwriter connects `libxlsxwriter` to Qt, while QSimpleXlsxWriter is presented as a writer-oriented C++ option. QXlsx's likely attraction is a direct Qt-oriented project boundary, but the README does not provide a performance comparison, feature comparison, or maintenance comparison among these choices. Claims about which one handles more Excel features would therefore be unverified.

The repository's alternatives provide a decision boundary. A project that already depends on `xlnt` or `libxlsxwriter` may prefer the corresponding helper, while a project seeking a single QXlsx-based workflow should examine QXlsx's examples directly.

Maintenance, Licensing, and Adoption Boundaries

The repository is not archived. Its last push was on 2026-08-25, and the recent releases listed are `v1.5.1.1` on 2026-06-18, `v1.5.1` on 2026-06-16, and `1.5.0` on 2024-12-31. These facts indicate recent repository activity and releases, but they do not establish the coverage of every spreadsheet feature or the compatibility of every application.

QXlsx is released under the MIT license. The README also states that Qt is available under LGPL v3 or a commercial license, and it credits QtXlsxWriter, Qt-Table-Printer, `recurse`, `libfort`, `colorprintf`, and HelloActions-Qt under their listed licenses. An application should review those dependency and Qt licensing terms as part of its own compliance work. This is a licensing inventory, not legal advice.

The clearest wrong-tool case is a requirement involving a file format other than `.xlsx`, because QXlsx's stated scope is Excel `.xlsx` files. Another boundary is a spreadsheet requirement whose exact support is not shown in the README or examples. The repository is a fit for Qt C++ applications, but the absence of a documented feature matrix means feature validation must happen before adoption.

Editorial conclusion

Adopt QXlsx when a Qt application needs a direct C++ library boundary for `.xlsx` reading and writing and your build can follow its qmake or CMake setup. Do not choose it for Excel formats other than `.xlsx`, or when you require a fully documented Excel feature set beyond the examples and project documentation. Verify first that the required cell, formula, chart, and integration behavior exists in the relevant QXlsx version and examples.

Frequently asked questions

How do I set up QXlsx in a Qt project?

Use `HowToSetProject.md` for a qmake project or `HowToSetProject-cmake.md` for a CMake project, as directed by the README. The main README does not include the complete project configuration itself.

Can QXlsx be used as a static library?

Yes. The README says that QXlsx does not require a static library or a dynamic shared object and that it can also be used as a static library.

Does QXlsx support writing `.xlsx` files?

Yes. QXlsx is described as an Excel file reader and writer library for `*.xlsx`, and the repository includes examples related to spreadsheet creation and editing.

Official sources

  1. License: MIT
  2. Project website
  3. QtExcel/QXlsx on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/qtexcel-qxlsx.svg)](https://hysenlabs.com/projects/qtexcel-qxlsx)

Was this useful?