解決方法在此: https://github.com/dbzhang800/QtXlsxWriterhtml
Documentation: http://qtxlsx.debao.melinux
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 togit
Generate a new .xlsx file from scratch Extract data from an existing .xlsx file Edit an existing .xlsx file Getting Startedgithub
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 moduleui
Building the modulethis
Note: Perl is needed in this step. Download the source code.url
Put the source code in any directory you like.net
Go to top directory of the project in a terminal and runcode
qmake make make install
The library, the header files, and others will be installed to your system.orm
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.