资源简介
可以解析大容量的Excel的库 C++代码
提供了样例: ParseExcel_样例.rar,双击exe就可以了.
特点:
1. 性能很快,可以读取几万行的excel,10万行,5列,2分多钟,
2. 支持2003,2007, 2010的excel解析,而且不安装Office都可以解析excel
非常不错的一个东东
目前,只有windows上的版本
我尝试了VS2010的版本,移植到了Qt中
rar文件中的代码路径:
libxl-3.1\libxl-3.1\libxl-3.1.0\examples\c++\vs2010\extract

代码片段和文件信息
#include
#include
#include “libxl.h“
int main()
{
BookHandle book = xlCreateBook();
if(book)
{
int i f[6];
FormatHandle format[6];
SheetHandle sheet;
f[0] = xlBookAddCustomNumFormat(book “0.0“);
f[1] = xlBookAddCustomNumFormat(book “0.00“);
f[2] = xlBookAddCustomNumFormat(book “0.000“);
f[3] = xlBookAddCustomNumFormat(book “0.0000“);
f[4] = xlBookAddCustomNumFormat(book “####.00 $“);
f[5] = xlBookAddCustomNumFormat(book “####.00 $[Black][<1000];####.00 $[Red][>=1000]“);
for(i = 0; i < 6; ++i) {
format[i] = xlBookAddFormat(book 0);
xlFormatSetNumFormat(format[i] f[i]);
}
sheet = xlBookAddSheet(book “Custom formats“ 0);
if(sheet)
{
xlSheetSetCol(sheet 0 0 20 0 0);
xlSheetWriteNum(sheet 2 0 25.718 format[0]);
xlSheetWriteNum(sheet 3 0 25.718 format[1]);
xlSheetWriteNum(sheet 4 0 25.718 format[2]);
xlSheetWriteNum(sheet 5 0 25.718 format[3]);
xlSheetWriteNum(sheet 7 0 1800.5 format[4]);
xlSheetWriteNum(sheet 9 0 500 format[5]);
xlSheetWriteNum(sheet 10 0 1600 format[5]);
}
if(xlBookSave(book “custom.xls“)) printf(“\nFile custom.xls has been created.\n“);
xlBookRelease(book);
}
printf(“\nPress any key to exit...“);
_getch();
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3057152 2011-02-04 22:21 libxl-3.1\libxl-3.1.0\bin\libxl.dll
文件 4404736 2010-11-17 22:19 libxl-3.1\libxl-3.1.0\bin64\libxl.dll
文件 8424 2010-11-15 19:48 libxl-3.1\libxl-3.1.0\changelog.txt
文件 1578 2010-08-18 16:16 libxl-3.1\libxl-3.1.0\examples\c\mingw\custom.c
文件 749 2010-01-29 10:39 libxl-3.1\libxl-3.1.0\examples\c\mingw\edit.c
文件 675 2010-01-29 10:39 libxl-3.1\libxl-3.1.0\examples\c\mingw\extract.c
文件 994 2010-08-18 16:17 libxl-3.1\libxl-3.1.0\examples\c\mingw\format.c
文件 886 2010-08-18 16:16 libxl-3.1\libxl-3.1.0\examples\c\mingw\generate.c
文件 3788 2010-08-18 16:17 libxl-3.1\libxl-3.1.0\examples\c\mingw\invoice.c
文件 976 2010-11-15 18:54 libxl-3.1\libxl-3.1.0\examples\c\mingw\makefile
文件 2636 2010-08-18 16:17 libxl-3.1\libxl-3.1.0\examples\c\mingw\performance.c
文件 1586 2010-08-18 16:24 libxl-3.1\libxl-3.1.0\examples\c\vs2008\custom\custom.c
文件 3872 2010-11-15 18:55 libxl-3.1\libxl-3.1.0\examples\c\vs2008\custom\custom.vcproj
文件 752 2010-01-29 10:39 libxl-3.1\libxl-3.1.0\examples\c\vs2008\edit\edit.c
文件 3866 2010-11-15 18:56 libxl-3.1\libxl-3.1.0\examples\c\vs2008\edit\edit.vcproj
文件 681 2010-01-29 10:39 libxl-3.1\libxl-3.1.0\examples\c\vs2008\extract\extract.c
文件 3875 2010-11-15 18:56 libxl-3.1\libxl-3.1.0\examples\c\vs2008\extract\extract.vcproj
文件 998 2010-08-18 16:22 libxl-3.1\libxl-3.1.0\examples\c\vs2008\format\format.c
文件 3872 2010-11-15 18:56 libxl-3.1\libxl-3.1.0\examples\c\vs2008\format\format.vcproj
文件 889 2010-08-18 16:21 libxl-3.1\libxl-3.1.0\examples\c\vs2008\generate\generate.c
文件 3878 2010-11-15 18:56 libxl-3.1\libxl-3.1.0\examples\c\vs2008\generate\generate.vcproj
文件 3801 2010-08-18 16:25 libxl-3.1\libxl-3.1.0\examples\c\vs2008\invoice\invoice.c
文件 3875 2010-11-15 18:57 libxl-3.1\libxl-3.1.0\examples\c\vs2008\invoice\invoice.vcproj
文件 3646 2010-01-29 10:39 libxl-3.1\libxl-3.1.0\examples\c\vs2008\libxl.sln
文件 2645 2010-08-18 16:25 libxl-3.1\libxl-3.1.0\examples\c\vs2008\performance\performance.c
文件 3887 2010-11-15 18:57 libxl-3.1\libxl-3.1.0\examples\c\vs2008\performance\performance.vcproj
文件 1586 2010-08-18 16:24 libxl-3.1\libxl-3.1.0\examples\c\vs2010\custom\custom.c
文件 5626 2010-11-15 19:07 libxl-3.1\libxl-3.1.0\examples\c\vs2010\custom\custom.vcxproj
文件 752 2010-01-29 10:39 libxl-3.1\libxl-3.1.0\examples\c\vs2010\edit\edit.c
文件 5622 2010-11-15 19:08 libxl-3.1\libxl-3.1.0\examples\c\vs2010\edit\edit.vcxproj
............此处省略147个文件信息
相关资源
- 国际象棋的qt源代码
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
- c++ 画图(14Qt-XPS)
- c++多边形交并差运算
评论
共有 条评论