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_docscan be used to generate documentations of the library, andmake checkcan 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. ...
随机推荐
- 生命周期-初识IOS
经常因为生命周期的事情,而视图顺序加载错误,或者出现一系列的小错误并且修改不出来,程序员不知道生命周期确实挺可悲的. IOS生命周期: 自上而下的执行,并且viewDidLoad只会执行一次,所以我们 ...
- javasscript学习笔记 之 数组学习二 数组的所有方法
1.push() 和 pop() 栈的方法 后进先出 push() 该方法是向数组末尾添加一个或者多个元素,并返回新的长度. push()方法可以接收任意数量的参数,把它们逐个添加到数组的末尾,并返 ...
- Web Service学习笔记(webservice、soap、wsdl、jws详细分析) (转)
Web Service概述 Web Service的定义 W3C组织对其的定义如下,它是一个软件系统,为了支持跨网络的机器间相互操作交互而设计.Web Service服务通常被定义为一组模块化的API ...
- Jquery:jquery中的DOM操作<一>
之前两天学习了Jquery强大的选择器,今天学习了一部分Jquery对DOM的操作,下面我将把自己今天的成果分享给大家,那些菜鸟们,你们是否需要巩固之前所学? 首先需要知道,DOM操作分为3个方面:D ...
- silverlight visifire控件图表制作——silverlight 静态页面xaml
一.silverlight 静态页面 1. 时间控件:DatePicker ,添加引用: xmlns:sdk="clr-namespace:System.Windows.Controls;a ...
- ios面试汇总
http://www.360doc.com/content/15/0707/01/26281448_483232245.shtml
- (一)CodeMirror - 基本应用
基本引用: <link rel="stylesheet" href="../lib/codemirror.css"> <script src= ...
- 方法覆盖(override)”的要点
方法覆盖要求子类与父类的方法一模一样,否则就是方法重载(overload)!请自行编写代码测试以下特性:在子类中,若要调用父类中被覆盖的方法,可以使用super关键字. 结论: 在“ ...
- Go学习笔记(一):Ubuntu 环境下Go的安装
本文是根据<Go Web 编程>,逐步学习 Ubuntu 环境下go的安装的笔记. <Go Web 编程>的URL地址如下: https://github.com/astaxi ...
- T-SQL语句——UNION, EXCEPT, INTERSECT
UNION,EXCEPT, INTERSECT关键字用于对集合的查询,它们的作用分别为: UNION:合并两个或多个 SELECT 语句的结果集,并把重复结果去除: UNIONALL:合并两个或多个 ...