If you have Excel spreadsheets generated from .NET Core applications, you may find it useful to store your files in a PDF format.
Several reasons include:
Alternatively, you may need to create and distribute the following company reports:
GrapeCity Documents for Excel (GcExcel) is a high-speed, small-footprint spreadsheet API that requires no dependencies on Excel. With full .NET Core support, you can generate, load, modify, and convert spreadsheets in .NET Framework, .NET Core, Mono, and Xamarin. Apps using this spreadsheet API can be deployed to cloud, Windows, Mac, or Linux.
In this demo we will cover the following:
Note: When working with GcExcel on MAC, Linux, you need to specify the Workbook.FontFolderPath and place the necessary fonts in it, before exporting spreadsheets to PDF.
For more information, visit: Configure Fonts and Set Style.
Follow this link to create a basic Excel spreadsheet on Windows, MAC or Linux.
After end of this tutorial, your Spreadsheet would look like this:
In Step 1, we created an Excel spreadsheet using GcExcel workbook and saved it to Excel file. Instead of saving to Excel, you can directly save the workbook to PDF using following code:
workbook.Save(@"SimpleBudget.pdf",SaveFileFormat.Pdf);
Your PDF would look like this:
If you want to convert any of your Excel files, (whether created with GcExcel or from another third-party tool) you can do so in just three steps using GcExcel.
Suppose you want to convert an Excel file, that calculates the summary of the total account data (as per different age groups in a region) to a PDF.
You can follow these steps:
Create an empty workbook
var workbook = new GrapeCity.Documents.Excel.Workbook();
Load Excel file into the workbook
var fileStream = new FileStream("AgingReport.xlsx", FileMode.Open);
workbook.Open(fileStream);
Save To PDF
workbook.Save("AgingReport.pdf", SaveFileFormat.Pdf);
You have converted your excel spreadsheet to PDF!
If you are looking for additional features or if you have a request for a demo, please leave a comment below!