The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello, i want to imort only a specefic range of excel cell data into PDF. Please help me how can i accomplish it. Is there any utility available in Syncfusion to fullfill this requirment ?
DBDilli Babu Nandha Gopal Syncfusion Team November 6, 2015 05:09 AM UTC
Hi Awais
Thank you for contacting Syncfusion support.
In XlsIO, you can convert the specific range in a worksheet to PDF by setting a print area using PrintArea property of IPageSetup. This behavior can be achieved by using the following code example.
Code example
IWorksheet worksheet = workbook.Worksheets[0]; // Setting the PrintArea for the worksheet. worksheet.PageSetup.PrintArea = "$A$1:$E$5"; ExcelToPdfConverter converter = newExcelToPdfConverter(worksheet); PdfDocument pdf = converter.Convert(); pdf.Save("PrintArea.pdf");
We have shared a sample for your reference which can be downloaded from the following link.