• 4427阅读
  • 2回复

[提问]关于QtXlsxWriter(一个读写excel的库)的安装问题 [复制链接]

上一主题 下一主题
离线leolin0518
 

只看楼主 倒序阅读 楼主  发表于: 2016-08-03
我是按照这个说明,安装
    qmakemakemake install
make的时候没有make,使用mingw32-make出错。额,这个库貌似是咱们论坛的人写的。

我的环境是QT5.7









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


[/url]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


[url=https://github.com/dbzhang800/QtXlsxWriter#usage1-use-xlsx-as-qt5s-addon-module]
Usage(1): Use Xlsx as Qt5's addon module



[/url]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
    qmakemakemake installThe 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.


[url=https://github.com/dbzhang800/QtXlsxWriter#using-the-module]
Using the module

  • Add following line to your qmake's project file:
    QT += xlsx
  • Then, using Qt Xlsx in your code
    #include <QtXlsx>int main(){QXlsx::Document xlsx;xlsx.write("A1", "Hello Qt!");xlsx.saveAs("Test.xlsx");return 0;}
离线leolin0518

只看该作者 1楼 发表于: 2016-08-03
离线leolin0518

只看该作者 2楼 发表于: 2016-08-03
问题已解决
快速回复
限100 字节
 
上一个 下一个