libXL-3.7.2.0_Linux_Incl_Keygen_20170402.7z


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.
“);
        xlBookRelease(book);
    }

    return 0;
}

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)