QtXlsxWriter
- C++ 98.5%
- QMake 1.2%
- Other 0.3%
Fix Issue #83: Make sure chartsheet appear on the proper location.
examples | xlsxwidget: Fix file path filter passed to QFileDialog | 4 months ago | |
src | Fix Issue #83: Make sure chartsheet appear on the proper location. | 14 days ago | |
tests | Don't lost valid characters unsed in sheetName, such as space | 17 days ago | |
.gitignore | Update .gitignore | 2 years ago | |
.qmake.conf | Add workaround for Issue #60 | 4 months ago | |
README.md | Update reference links in the README file. | 5 months ago | |
qtxlsx.pro | Refactor: Follow Qt5 module's file directories style | 2 years ago | |
sync.profile | Refactor: Follow Qt5 module's file directories style | 2 years ago |
README.md
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, andmake check
can be used to run unit tests of the library.
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;
}
Usage(2): Use source code directly
The package contains a qtxlsx.pri file that allows you to integrate the component into applications that use qmake for the build step.
Download the source code.
Put the source code in any directory you like. For example, 3rdparty:
|-- project.pro
|-- ....
|-- 3rdparty\
| |-- qtxlsx\
| |
- Add following line to your qmake project file:
include(3rdparty/qtxlsx/src/xlsx/qtxlsx.pri)
Note: If you like, you can copy all files from src/xlsx to your application's source path. Then add following line to your project file:
include(qtxlsx.pri)
Note: If you do not use qmake, you need to define the following macro manually
XLSX_NO_LIB
- Then, using Qt Xlsx in your code
#include "xlsxdocument.h"
int main()
{
QXlsx::Document xlsx;
xlsx.write("A1", "Hello Qt!");
xlsx.saveAs("Test.xlsx");
return 0;
}
References
- http://www.ecma-international.org/publications/standards/Ecma-376.htm
- http://www.iso.org/iso/catalogue_detail?csnumber=51463
- http://msdn.microsoft.com/en-us/library/ee908652%28v=office.12%29.aspx
- http://www.datypic.com/sc/ooxml/
General
- https://github.com/jmcnamara/XlsxWriter
- http://openpyxl.readthedocs.org
- http://officeopenxml.com/anatomyofOOXML-xlsx.php
- http://www.libxl.com
- http://closedxml.codeplex.com/
- http://epplus.codeplex.com/
- http://excelpackage.codeplex.com/
- http://spreadsheetlight.com/
Number formats
- http://msdn.microsoft.com/en-us/library/ff529356%28v=office.12%29.aspx
- http://www.ozgrid.com/Excel/excel-custom-number-formats.htm
- http://stackoverflow.com/questions/894805/excel-number-format-what-is-409
- http://office.microsoft.com/en-001/excel-help/create-a-custom-number-format-HP010342372.aspx
Formula
QtXlsxWriter的更多相关文章
- qt5之使用QtXlsxWriter库
note Qt version: 5.12 platform: os x 10.15 本文将介绍直接使用QtXlsxWriter源码 准备 下载QtXlsxWriter 使用Qt Creator 创建 ...
- Excel文件操作方式比较
C++读取Excel的XLS文件的方法有很多,但是也许就是因为方法太多,大家在选择的时候会很疑惑. 由于前两天要做导表工具,比较了常用的方法,总结一下写个短文, 1.OLE的方式 这个大约是最常用的方 ...
- C++读写EXCEL文件OLE,java读写excel文件POI 对比
C++读写EXCEL文件方式比较 有些朋友问代码的问题,将OLE读写的代码分享在这个地方,大家请自己看.http://www.cnblogs.com/destim/p/5476915.html C++ ...
- 39.QT-Qtxlsx库使用
之前参考博客https://blog.csdn.net/c3060911030/article/details/51560239下载Qtxlsx库,然后编译的时候,显示: error: invalid ...
- 收藏的博客 -- Qt/C++学习
Qt Creator环境: 使用Qt Creator作为Linux IDE,代替Vim:实现两台Linux电脑远程部署和调试(一台电脑有桌面系统,一台电脑无桌面系统) 使用Qt Creator作为Li ...
- C/C++读写excel文件 的几种方式
因为有些朋友问代码的问题,将OLE读写的代码分享在这个地方,大家请自己看. http://blog.csdn.net/fullsail/article/details/8449448 C++读取Exc ...
- qt 使用qtxlsx 读写excel
https://github.com/dbzhang800/QtXlsxWriter 下载qtxlsx地址 QtXlsx is a library that can read and write Ex ...
- Unknown module(s) in QT: xlsx解决方法
解决方法在此: https://github.com/dbzhang800/QtXlsxWriter Documentation: http://qtxlsx.debao.me QtXlsx is a ...
- 使用QtXlsx来读写excel文件
概述:QtXlsx是功能非常强大和使用非常方便的操作excel类库.包括对excel数据读写.excel数据格式设置及在excel里面根据数据生成各种图表. 下面重点介绍如何安装和使用QtXlsx. ...
随机推荐
- linux 服务器更主板后无法识别网卡处理过程
linux 服务器更主板后无法识别网卡处理过程 服务器故障报修,主板坏,更换主板后无法识别网卡,ifconfig 查看只显示:lo loopback 127.0.0.1. 系统加载网卡驱动后会去读 ...
- c#读写cookie
读 response.SetCokie(new HttpCookie("Color",TextBox1.Text);写 request.Cookies["color&qu ...
- paip输入法编程之生活用高频字,以及汉字分级
paip输入法编程之生活用高频字 作者Attilax , EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csdn.net/attilax ...
- Java中的日期操作
在日志中常用的记录当前时间及程序运行时长的方法: public void inject(Path urlDir) throws Exception { SimpleDateFormat sdf = n ...
- python视频教程大全集下载
python3英文视频教程(全87集) http://pan.baidu.com/s/1dDnGBvV Python从入门到精通视频(全60集)链接:http://pan.baidu.com/s/1e ...
- DataTables选择行并删除(删除单行)
$(document).ready(function() { var table = $('#example').DataTable(); $('#example tbody').on( 'click ...
- Oracle静态监听和动态监听
一.静态注册 静态注册指实例启动时读取listener.ora配置文件,将实例和服务注册到监听程序.无论何时启动一个数据库,默认都有两条信息注册到监听器中:实例和服务.SID_LIST_LISTENE ...
- 一种针对虚拟机的应用软件License认证方法
由于虚拟机的硬件信息可以随意修改,使得虚拟机可能具有相同的硬件信息,在传统的应用软件License认证方式中会导致License认证漏洞.本专利提供了一种有效的解决方法. 文/王宏财 目 前,云计算的 ...
- MySQL表复制
http://www.2cto.com/database/201202/120259.html http://www.cnblogs.com/sunss/archive/2010/10/08/1845 ...
- bzoj1753 [Usaco2005 qua]Who's in the Middle
Description FJ is surveying his herd to find the most average cow. He wants to know how much milk th ...