8

Does ClosedXML have any function that can be used to save an excel file as PDF?

Currently i am using ClosedXML to create and populate the excel file and then using Interop to save as PDF.
But since Interop depends on the MS Office installed on the syatem the formatting changes on every version of MS Office. And since ClosedXML doesnt require having MS office installed it would be nice to be able to export or save as PDF directly from it without using Interops.

ilmenite
  • 199
  • 1
  • 3
  • 11

3 Answers3

12

Does ClosedXML have any function that can be used to save an excel file as PDF?

No.

Francois Botha
  • 4,520
  • 1
  • 34
  • 46
  • I did find this https://www.nuget.org/packages/ClosedXML_Excel. I’m going to give it a try in the next few weeks, see if it works. Looks like it may be a fork of ClosedXML. – Jay Imerman Nov 09 '19 at 14:49
  • That lib worked really well for that purpose, but the sources are not available and it hasn't been updated since 2014. – mababin Sep 08 '22 at 20:45
0

Instead you can use the free version of GemBox.Spreadsheet.

Also look at the top 10 libraries which allows us to manipulate excel.

However GemBox was the only free and featured one that I found with the purpose of creating an invoice report for a website, by converting excel to pdf.

Sujoy
  • 1,051
  • 13
  • 26
0

you can use the ClosedXML.Excel and iTextSharp to convert Excel to PDF file. Here a link with example: Convert Excel file to Pdf in ASP.Net