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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Import excel data to pdf

Thread ID:





121040 Nov 5,2015 08:16 AM UTC Nov 6,2015 05:09 AM UTC WinForms 1
Tags: XlsIO
Asked On November 5, 2015 08:16 AM UTC

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 ?

Kind Regards,
Awais Afzal.

Dilli Babu Nandha Gopal [Syncfusion]
Replied On 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 = new ExcelToPdfConverter(worksheet);
PdfDocument pdf =  converter.Convert();

We have shared a sample for your reference which can be downloaded from the following link.

Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/PrintAreaToPDF1074774529.zip

You can also refer to our UG documentation to know more about PrintArea property.
UG Documentation link: http://help.syncfusion.com/windowsforms/xlsio/working-with-excel-worksheet#page-setup-settings

Dilli babu


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon