資源簡介
可以解析大容量的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個文件信息
評論
共有 條評論