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. ...
随机推荐
- Python进阶之路---1.2python版本差异
Python2.*与python3.*版本差异 作为一个初学者,我们应该如何选择python的版本进行学习呢,这两个版本有什么区别呢,接下来让我们简单了解一下,以便我们后续的学习. Python版本差 ...
- scala中的view bound与context bound
1.scala中的<%意识是“view bounds”(视界) ,它比<:的使用范围更广,还能进行隐式转换,是一种语法糖. 下面的两种写法是等效的,在编译之后完全一样. object Te ...
- (转)log4net使用详解
说明:本程序演示如何利用log4net记录程序日志信息.log4net是一个功能著名的开源日志记录组件.利用log4net可以方便地将日志信息记录到文件.控制台.Windows事件日志和数据库(包括M ...
- Silverlight Visifire控件 .net后台控制aspx页面控件的显示与隐藏,动态给控件赋值,选定默认值的设定
.net后台代码: 控件的显示与隐藏: this.dateStart.Visibility = Visibility.Collapsed;//不显示控件 this.dateYear.Visibilit ...
- VC中遍历进程并获取进程信息
代码如下: /***************************************************/ /* 函数: 遍历进程信息 /* 参数:进程名称 例如: aaa.exe /* ...
- freemarker 的replace功能
替换字符串 replace ${s?replace(‘ba’, ‘XY’ )} ${s?replace(‘ba’, ‘XY’ , ‘规则参数’)}将s里的所有的ba替换成xy 规则参数包含: i r ...
- sqlalchemy操作Mysql
SQLAlchemy“采用简单的Python语言,为高效和高性能的数据库访问设计,实现了完整的企业级持久模型”.SQLAlchemy的理念是,SQL数据库的量级和性能重要于对象集合:而对象集合的抽象又 ...
- 九章算法系列(#3 Binary Tree & Divide Conquer)-课堂笔记
前言 第一天的算法都还没有缓过来,直接就进入了第二天的算法学习.前一天一直在整理Binary Search的笔记,也没有提前预习一下,好在Binary Tree算是自己最熟的地方了吧(LeetCode ...
- Linux 结束占用端口的程序
[root@ucit ~]# lsof -i:80COMMAND PID USER FD TYPE DEVICE SIZE NODE NAMEjava 1839 root ...
- Google Chrome源码剖析【序】
[序(本人什么都没做,完全转载)] 开源是口好东西,它让这个充斥着大量工业垃圾代码和教材玩具代码的行业,多了一些艺术气息和美的潜质.它使得每个人,无论你来自米国纽约还是中国铁岭,都有机会站在巨人的肩膀 ...