We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

xlsio - Convert Worksheet to PDF

There is nothing in the Control dropdown for Excel, so I select ed DocIO, which is close. But frustrating.


I've created a workbook using xlsio and now I want to save it as a PDF.

When I copy/paste a sample from the documentation:

 //convert the sheet to PDF
  ExcelToPdfConverter converter = new ExcelToPdfConverter(sheet);

I get:

Severity Code Description Project File Line Suppression State

Error CS0246 The type or namespace name 'ExcelToPdfConverter' could not be found (are you missing a using directive or an assembly reference?) ... 749 Active

I haven't found any documentation on additional using statements. So, I'm stuck.





1 Reply

KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team March 3, 2023 11:14 AM UTC

Hi Keith,


ExcelToPdfConverter class is implemented for converting Excel files to PDF using XlsIO, under .NET Framework. Under .NET Core, this is implemented as XlsIORenderer. As you are using Blazor platform, we suggest you to use XlsIORenderer instead of ExcelToPdfConverter.


To use XlsIORenderer, Syncfusion.XlsIORenderer.Net.Core NuGet package should be installed in your application.


Please go through the below link, where the NuGet packages required for each operation with Excel is documented.

https://help.syncfusion.com/file-formats/xlsio/nuget-packages-required


Please go through the below link for information about migrating .NET Framework to .NET Core.

https://help.syncfusion.com/file-formats/xlsio/faqs/migrate-from-net-framework-to-net-core


Regards,

Keerthi.


Loader.
Up arrow icon