I’ve got a report being exported as .csv, and I need to offer two more formats of the report – .xlsx and .pdf, with added headers/footers/images.
Originally, my plan was to use Microsoft.Office.Interop.Excel to open the .csv, modify it with EPPlus to add the header/footer/logo, and save it as an .xlsx file, then export it as a .pdf but the application is running within IIS, and automating office server-side is not recommended or supported.
1) Are there any free for commercial use tools for opening .CSV files and saving them as .XLSX?
- EPPlus is the best option for this, as I can open CSV files, edit them, and save as Excel, which meets my requirement.
2) Are there any free for commercial use tools for exporting an Excel .XLSX file to .PDF?
3) Is there a tool that can do both?
To read csv files very easily and model based you can use filehelpers.
http://www.filehelpers.net/
And to create excel files you can use epplus which is really good:
http://epplus.codeplex.com/
EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx).
GNU Library General Public License (LGPL)
To create pdf file you can use PdfSharp
http://www.pdfsharp.net/Licensing.ashx
PDFsharp and MigraDoc Foundation are published under the MIT License.
See the PDFsharp License.
See the MigraDoc Foundation License.