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?
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.
PDFsharp and MigraDoc Foundation are Open Source and free to use Copy, modify and integrate the source code of PDFsharp and MigraDoc Foundation in your applications without restrictions at all This also applies to commercial products (both Open Source and Closed Source) PDFsharp and MigraDoc Foundation will remain Open Source and free to use even in the far future
To work with post-2007 excel files (.xlsx), I highly recommend ClosedXML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With