C# export to excel

后端 未结 5 614
盖世英雄少女心
盖世英雄少女心 2021-01-16 07:04

Which is the best way to export data to an existing xls sheet. I needs to support many versions of excel. If i was using Visual basic. I would use the CreateObject(\"Excel.a

5条回答
  •  無奈伤痛
    2021-01-16 07:56

    I know you said no third-party but the reason seems to be cost.

    The library I use is GemBox. It is free as long as the spreadsheets are not too large (150 rows and 5 worksheets max). For my use this is no problem and it works very well.

    http://www.gemboxsoftware.com/GBSpreadsheet.htm

    There are also some open source options.

    If you are writing to the XML format then ExcelPackage is free (GPL) and may work for you:

    http://excelpackage.codeplex.com/

    If you want no XML but the other formats, I hear good things about ExcelLibrary (LGPL):

    http://code.google.com/p/excellibrary/

    There is also a port of the JExcel library (LGPL) to C#:

    http://www.chrislaforetsoftware.com/products.html

提交回复
热议问题