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. ...
随机推荐
- UIWindow in iOS
这篇文章,我将分享对UIWindow我所知道的东西. keyWindow 一个应用能够有许多UIWindow,“The key window”是其中一个,被设计用来接受键盘和其他与点击无关的事件.一个 ...
- My way on Linux - [虚拟化&云计算] - 云计算概述&KVM虚拟化基础
思维导图
- First 5 minutes of SQLite
What is SQLite? SQLite is light-weight RDBMS, it is use the file system rather than the C/S client, ...
- IOS网络开发实战(二)
1 飞机航班查询软件 1.1 问题 NSURLConnection是IOS提供的用于处理Http协议的网络请求的类,可以实现同步请求也可以实现异步请求,本案例使用NSURLConnection类实 ...
- 移动web前端的一些硬技能(一)关于移动设备
移动端web其实也就是小尺寸触摸屏设备的web,其中包含了两个词——1.小尺寸设备:2.触摸屏.能把这两个问题给解决掉,就已经是一个基本合格的移动web前端开发工程师了.对于前端工程师来说,前路漫漫, ...
- C语言多维数组的地址
设有整型二维数组a[3][4]如下: 0 1 2 3 4 5 6 7 8 9 10 11 它的定义为: int a[3][4]={{0,1,2,3},{4,5 ...
- Hdu1092
#include <stdio.h> int main() { ; while(scanf("%d",&n)){ ) {;} else{ int i,a; ;i ...
- DataTables选择多行
$(document).ready(function() { var table = $('#example').DataTable(); $('#example tbody').on( 'click ...
- GetSystemTime API可以得到毫秒级时间
用Now返回的日期格式中年只有2位,即2000年显示为00, 这似乎不太令人满意. 此外Now和Time都只能获得精确到秒的时间,为了得到更精确的毫秒级时间,可以使用API函数GetSystemTim ...
- 《Programming WPF》翻译 第6章 3.二进制资源
原文:<Programming WPF>翻译 第6章 3.二进制资源 尽管ResourceDictionary和系统级别的资源适合于作为数据存在于对象中,然而,并不是所有的资源都能很好的满 ...