This is a migrated thread and some comments may be shown as answers.

Output to PDF, specific Worksheet

2 Answers 153 Views
SpreadProcessing
This is a migrated thread and some comments may be shown as answers.
Joel Palmer
Top achievements
Rank 2
Joel Palmer asked on 17 Mar 2015, 03:46 PM
Is there a way to output one specific worksheet to a PDF document?  Or, must I always rely on spreadsheet formatting?

2 Answers, 1 is accepted

Sort by
0
Accepted
Tanya
Telerik team
answered on 18 Mar 2015, 03:59 PM
Hello Joel,

By default, the PdfFormatProvider exports the active worksheet only. If your goal is to export a specific worksheet you could set the Workbook's ActiveWorksheet property to point to it:
workbook.ActiveWorksheet = workbook.Worksheets[1];

If you would like to control what is exported in what page in the pdf, you can use the PdfExportSettings class, as is shown in the sample code in Example 2 in the Pdf Settings article. Each of the ranges specified in the code will be printed on a separate page.
 
Hope this helps.

Regards,
Tanya
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Joel Palmer
Top achievements
Rank 2
answered on 18 Mar 2015, 04:25 PM
Awesome.  I figured there had to be a way to do it.  I'll give it a try.

Thanks for your help,
Joel
Tags
SpreadProcessing
Asked by
Joel Palmer
Top achievements
Rank 2
Answers by
Tanya
Telerik team
Joel Palmer
Top achievements
Rank 2
Share this question
or