- 中国标准城市区域码
- postgresql 截取日期字符串 的函数
- OkHttp 官方中文文档
- 关于java中“使用了未经检查或不安全的操作、有关详细信息,请使用 ——X临潼:unchecked重新编译”
- 什么值得买自动签到自动评论定时任务
- chrome://plugins 无法打开的解决方法,同时解决“该网页已屏蔽插件-adobe flash player”
- 如何在GPT格式下创建EFI和MSR分区(安装WIN10/WIN8.1)
- 联想X270——正版Win10换win7之BIOS配置及系统安装
- 几款开源的堡垒机
- code128条码生成与显示
- Java操作Excel,设置某些单元格不可编辑(HSSFWorkbook ,XSSFWorkbook )
- 第04章-VTK基础(6)
- 通达OA用户操作手册(一)
- postgresql——字符串函数
- (转)C#进行图像处理的几种方法(Bitmap,BitmapData,IntPtr)
- 5.EVE-NG关联SecureCRT,VNC,Wireshark
- Stream 操作 合并两个list
- Unity 利用UGUI打包图集,动态加载sprite资源
- elasticsearch 数据丢失的分析
- win7&win10安装AD管理工具
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