当前位置:网站首页>Qt编译QtXlsx库
Qt编译QtXlsx库
2022-04-23 07:15:00 【欧特_Glodon】
一、QtXlsx库的编译
提供下载包:包含编译好的Qt5.6.3版本、QtXlsx源码以及Perl5软件安装包。
下载地址
1、下载QtXlsx源码
地址:QtXlsxWriter下载地址
下载后解压到自己的磁盘中,路径不要包含空格和特殊字符。

2、安装Perl5
由于编译QtXlsx库需要用到Perl脚本,所以必须确保有这样的执行环境,否则会报错,先cmd进入命令行查看自己是否安装Perl5:

如果没有安装,自行去下载perl5软件进行安装。
3、编译QtXlsx库

用自己安装的Qt打开qtxlsx.pro,然后进行编译即可。

4、使用方法
此处根据编译选择对应的路径:
- 首先将工程文件(路径:QtXlsxWriter-master\src\xlsx)中文件(具体见下面图片)拷贝到新建的QtXlsx文件夹中,最后将QtXlsx文件夹拷贝到Qt的安装目录下,比如我的拷贝到:D:\Qt\Qt5.7.0\5.7\msvc2013_64\include
- 接下来拷贝lib文件夹下Qt5Xlsxd.lib、Qt5Xlsx.lib、Qt5Xlsx.prl、Qt5Xlsxd.prl4个文件到你的Qt的lib下:D:\Qt\Qt5.7.0\5.7\msvc2013_64\lib
- 拷贝lib文件夹下的Qt5Xlsx.dll、Qt5Xlsxd.dll库文件到你的Qt库路径下D:\Qt\Qt5.7.0\5.7\msvc2013_64\bin
- 将构建目录下的mkspecs\modules-inst\qt_lib_xlsx.pri 和qt_lib_xlsx_private.pri到你的Qt模块下D:\Qt\Qt5.7.0\5.7\msvc2013_64\mkspecs\modules
注意:网上有很多说是将mkspecs\modules\qt_lib_xlsx.pri 拷贝到msvc2017\mkspecs\modules,但是这样是结果模块无法加载到项目中,应该是将构建目录下的mkspecs\modules-inst\qt_lib_xlsx.pri 和qt_lib_xlsx_private.pri到msvc2015\mkspecs\modules)
下来就可以使用Qt进行excel的操作了,只是需要注意:
- 使用的时候需要包含头文件#include
- 在.pro需要添加:QT += xlsx
- 完毕之后,最好先qmake再构建工程,否则会提示连接不到库;
之后就可以运行自己的QtXlsx项目了。
版权声明
本文为[欧特_Glodon]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_37251750/article/details/124339715
边栏推荐
- [problem solving] vs2019 solves the problem that the EXE file generated by compilation cannot be opened
- php高精度计算
- 使用 Ingress 实现金丝雀发布
- The following program deletes n consecutive words starting from the ith character from the string str
- Move layout (Flex layout, viewport label)
- 输入/输出系统
- Ubuntu安装Mysql并查询平均成绩
- Codeforces Round #784 (Div. 4)
- Principle of sentinel integrating Nacos to update data dynamically
- 1216_ MISRA_ C standard learning notes_ Rule requirements for control flow
猜你喜欢

How does feign integrate hystrix

The whole house intelligence bet by the giant is driving the "self revolution" of Hisense, Huawei and Xiaomi

NLLLoss+log_SoftMax=CE_Loss
![[programming practice / embedded competition] learning record of embedded competition (II): picture streaming based on TCP](/img/6c/7408180d0c24560b4a68982635520e.jpg)
[programming practice / embedded competition] learning record of embedded competition (II): picture streaming based on TCP

Brief description of CPU

Discussion on ES6 tail tune optimization

高精度焊接机械臂定位

Online yaml to XML tool

在MATLAB中快速画圆(给出圆心坐标和半径就能直接画的那种)

Draw a circle quickly in MATLAB (the one that can be drawn directly given the coordinates and radius of the center of the circle)
随机推荐
校园转转二手市场源码下载
Alibaba sentinel learning QA
LeetCode簡單題之計算字符串的數字和
How to import Excel data in SQL server, 2019 Edition
[go]常见的并发模型[泛型版]
惨了,搞坏了领导的机密文件,吐血分享备份文件的代码技巧
几种智能机器人室内定位方法对比
Quick rehearsal exercise
Jetson Xavier NX (3) bazel mediapipe installation
Face to face summary 2
Why are there 1px problems? How?
LeetCoed18. 四数之和
dried food! Point based: differentiable Poisson solver
学fpga(从verilog到hls)
Jetson Xavier NX(3)Bazel Mediapipe 安装
以下程序实现从字符串str中删除第i个字符开始的连续n个字
在线YAML转XML工具
Penetration test interview collection -- HVV---
Manipulator motion planning in 3C assembly
LeetCode简单题之三除数