• Excel文件读写


    C#读写Excel的方式有好几种,具体参考文章:

    http://www.cnblogs.com/huipengkankan/archive/2011/07/28/2120407.html

    昨天大致研究了一下,项目中使用LibXl库进行读写,官方网址:http://libxl.com/home.html,可以支持C#C++DelphiFortran等等,新版可以支持到Excel2013,用起来还是蛮方便的,但是要购买。

    破解的也有,可以参考:http://blog.csdn.net/lbd2008/article/details/8332345

    里面的函数不多,可以直接参考官方文档,或者看下百度文库

    官方小例子:

    class Program
    { 
        static void Main(string[] args)
        {
            try 
            {
                Book book = new BinBook(); // use XmlBook() for xlsx
                Sheet sheet = book.addSheet("Sheet1");
                sheet.writeStr(2, 1, "Hello, World !");
                sheet.writeNum(3, 1, 1000);
                book.save("example.xls");    
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
    }
  • 相关阅读:
    python 网络爬虫(三)
    python 网络爬虫(二)
    python 网络爬虫(一)
    python 爬虫原理
    (转)栈的生长方向
    CRC校验
    extern关键字
    E
    The Super Powers UVA
    V
  • 原文地址:https://www.cnblogs.com/zsb517/p/4310308.html
Copyright © 2020-2023  润新知