Documents for Excel, .NET Edition | How to Export a Spreadsheet to PDF

GrapeCity Documents for Excel, .NET Edition, is a fast, efficient spreadsheet API that enables you to generate, load, modify, and save spreadsheets in your .NET Standard 2.0 app. With GcExcel, you can parse, convert, and share spreadsheets, calculate formulas and format cells, then deploy to Azure and AWS.

In this video, we’ll export a spreadsheet to a PDF using GcExcel.

Let’s open an existing workbook. We’ve initialized it, added data, adjusted the formatting, and added a table with a databar and styles. We’re ready to save it to a PDF.

So we can compare outputs, we’ll save the workbook in both Excel and PDF.

For an Excel file, include the name of the workbook and save it as XLSX.

For the PDF file, directly name the workbook name.pdf and set SaveFileFormat to PDF.

Run the app. The Excel and PDF files have been created from the data.

When we open the XLSX file, we see the workbook we created. When we open the PDF, we see that it perfectly replicated the data and styles created in the workbook.

With GcExcel, you can command total control of your spreadsheets—with no dependencies on Excel.

If you have a comment or question about this tutorial, please leave your comments in the thread below.

Custom Code Your Spreadsheets in .NET

Download the latest version of GrapeCity Documents for Excel

Download Now!