Skip to footer content

How to Convert Excel Files to PDF in C#

In this tutorial, learn how to convert Excel files to PDF using C# and the IronPDF library. The process involves converting your Excel workbook into an HTML file first. This is done using the 'Save As' function in Excel, where you select 'Web Page' as the file type. Once converted, open your .NET project in Visual Studio 2022 and ensure you have the latest IronPDF version via the NuGet package manager. Instantiate a Chrome PDF render object and set the paper size to A2. Enter your IronPDF license key, available for purchase or through a 30-day trial. Use the 'Render HTML file as PDF' method to create a PDF from the HTML file. Save the resulting PDF using the 'Save As' method. By following these steps, you can successfully convert an Excel workbook to a PDF while retaining its original formatting. If you encounter any issues, the support team is available to assist.

Further Reading: How to Convert Excel Files to PDF in C#

Chipego
Software Engineer
Chipego has a natural skill for listening that helps him to comprehend customer issues, and offer intelligent solutions. He joined the Iron Software team in 2023, after studying a Bachelor of Science in Information Technology. IronPDF and IronOCR are the two products Chipego has been focusing on, but his knowledge of all products is growing daily, as he finds new ways to support customers. He enjoys how collaborative life is at Iron Software, with team members from across the company bringing their varied experience to contribute to effective, innovative solutions. When Chipego is away from his desk, he can often be found enjoying a good book or playing football.