Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Free for commercial use tools for .NET that can convert csv to excel and export excel to pdf? [closed]

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?

like image 397
Grahame A Avatar asked Jan 15 '23 03:01

Grahame A


2 Answers

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

like image 60
Nesim Razon Avatar answered Jan 25 '23 20:01

Nesim Razon


To work with post-2007 excel files (.xlsx), I highly recommend ClosedXML.

like image 40
Joe Avatar answered Jan 25 '23 21:01

Joe