资源简介
libxl 是一款原格式读写 excel 动态库,不依赖 office, 适合各种编程语言。本压缩包包含了 linux 版, 并包含注册机, 可以注册使用, 具体请看压缩包内说明。
代码片段和文件信息
#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(“File custom.xls has been created.\n“);
xlBookRelease(book);
}
return 0;
}
相关资源
- 蓝牙源代码应用于LINUX
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
- MP3文件ID3v2ID3v2APEv2标签读取
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
- 基于GTK的Linux环境下的简易任务管理器
- linux扫雷游戏代码
- CAN Linux驱动代码
- Linux系统教材
- intel 82579LM 网卡驱动Linux系统版 v1.9.
- SA1110处理器掌上电脑液晶显示器设计
- 基于Linux的串口服务器设计
川公网安备 51152502000135号
评论
共有 条评论