解决方法在此: https://github.com/dbzhang800/QtXlsxWriter
Documentation: http://qtxlsx.debao.me
QtXlsx is a library that can read and write Excel files. It doesn‘t require Microsoft Excel and can be used in any platform that Qt5 supported. The library can be used to
Generate a new .xlsx file from scratch
Extract data from an existing .xlsx file
Edit an existing .xlsx file
Getting Started
For linux user, if your Qt is installed through package manager tools such "apt-get", make sure that you have installed the Qt5 develop package qtbase5-private-dev
Usage(1): Use Xlsx as Qt5‘s addon module
Building the module
Note: Perl is needed in this step.
Download the source code.
Put the source code in any directory you like
Go to top directory of the project in a terminal and run
qmake
make
make install
The library, the header files, and others will be installed to your system.
make html_docs can be used to generate documentations of the library, and make check can be used to run unit tests of the library.
原文地址:https://www.cnblogs.com/Genesis-007/p/8566237.html