Are there any free libraries I can use to do that ?
Thank you.
Are there any free libraries I can use to do that ?
Thank you.
NPOI -- it's in development now -- but I think Excel is the first use case.
Take a look at the answers on this question. They might be useful to you.
Simple save as .CSV (with commat separated values of course).
I've used CarlosAg Excel Xml Writer Library. Works as advertised and has a lot of options.
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
Options:
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
Generate a csv with xsl extension if all you want to export is data
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.
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.
For production grade Excel file generation, you can use:
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
SpreadsheetGear
Aspose.Cells for .Net
(You can google for the links)
Cheers,
Ajit Singh