0

Are there any free libraries I can use to do that ?

Thank you.

Clyde
  • 8,017
  • 11
  • 56
  • 87
Sergejs
  • 2,540
  • 6
  • 32
  • 51
  • 1
    possible duplicate of [Import and Export Excel - What is the best library?](http://stackoverflow.com/questions/444522/import-and-export-excel-what-is-the-best-library) – Hans Passant Nov 02 '10 at 13:50
  • @Hans - very much so. there are lots. Its high time they got cleaned up and wiki'ed. – Anonymous Type Nov 03 '10 at 03:43

9 Answers9

3

I have used this tool with good results http://epplus.codeplex.com/

Kalle
  • 2,282
  • 1
  • 24
  • 30
1

NPOI -- it's in development now -- but I think Excel is the first use case.

http://npoi.codeplex.com/

Lou Franco
  • 87,846
  • 14
  • 132
  • 192
1

Take a look at the answers on this question. They might be useful to you.

Community
  • 1
  • 1
Prutswonder
  • 9,894
  • 3
  • 27
  • 39
1

Simple save as .CSV (with commat separated values of course).

  • 1
    It has to be user friendly formatted. Even pictires will be added there. – Sergejs Nov 02 '10 at 14:26
  • how did this answer get two votes? Does it answer the question at all? – Anonymous Type Nov 03 '10 at 03:40
  • @Anonymous Tripe, you are missing an important point: The correct answer to a question is reached in stages - and all answers that contribute towards the final accepted response deserve votes. The question (while mentitioning .xls files) did not specify that Excel objects - other than data - had to be saved. It was responses such as mine that contributed to a better understanding of the problem. – Zephyr was a Friend of Mine Nov 04 '10 at 08:49
  • 1
    It mentioned the format XLS specifically, so your answer is wrong from that point of view. Making assumptions about the persons requirements, because you are aware of a better, cleaner, whatever approach is missing the point. In fact you are redefining the problem as opposed to clarifying the problem. – Anonymous Type Nov 04 '10 at 23:39
1

I've used CarlosAg Excel Xml Writer Library. Works as advertised and has a lot of options.

alex
  • 3,710
  • 32
  • 44
1

You might want to check this out for a good place to find out about all sorts of usefull .net libraries:

https://stackoverflow.com/questions/662956/most-useful-free-net-libraries/4076407#4076407

Community
  • 1
  • 1
Liviu Mandras
  • 6,540
  • 2
  • 41
  • 65
0

Options:

  1. If you can output xslx instead of xsl investigate the xslx format as it's just a bunch of xmls archived together in a zip. You can generate those pretty easily using the various xml tools available in .NET

  2. Generate a csv with xsl extension if all you want to export is data

  3. If you need some basic formatting included in the exported file excel is able to open HTML tags with their containing tr/td. You can set style values (colors, fonts etc.) to those and excel will render them properly. Same strategy as point 2.

Adrian Zanescu
  • 7,907
  • 6
  • 35
  • 53
0

It's not free, but you can try the Excel library from Infragistics here. It handles importing/exporting, formula solving, formatting of cells and strings, and a lot of other things in these formats: XLS, XLT, XLSX, XLTX, XLSM, XLTM.

Note: I work for Infragistics.

Mike Dour
  • 3,616
  • 2
  • 22
  • 24
  • Note: This question says free. – Anonymous Type Nov 03 '10 at 03:41
  • 1
    I understand. That is why I prefaced my answer with "It's not free, but...". I thought this might be helpful for people who are willing to spend money and they search online and come across this thread. – Mike Dour Nov 03 '10 at 18:08
0

For production grade Excel file generation, you can use:

  1. OpenXML SDK for Excel 2007 and above format: http://www.microsoft.com/download/en/details.aspx?id=5124 http://openxmldeveloper.org/discussions/formats/f/14/p/732/1816.aspx

  2. SpreadsheetGear

  3. Aspose.Cells for .Net

(You can google for the links)

Cheers,

Ajit Singh

Ajit Singh
  • 1,016
  • 13
  • 26