Free Support Forum -

Convert to PDF - specific range/tab

I need to convert specific tab/range to PDF, and not the whole spreadsheet.
I’ve tried saving to PDF as described in but can’t find options to specify a tab.
Can you please advice.



Please see the topic:

If you need to render specific sheet to PDF, you may hide your unwanted sheets and make your desired worksheet visible to save to PDF file.

If you need to render specific range in a worksheet into PDF file, please set PageSetup.PrintArea attribute for specific worksheet, then save to PDF.

Workbook workbook = new Workbook(“e:\test2\Book1.xlsx”);
Worksheet sheet = workbook.Worksheets[0];
Aspose.Cells.PageSetup pageSetup = sheet.PageSetup;
pageSetup.PrintArea = “A1:F20”;

See the document on printing or other PageSetup options that you may try:

Thank you.

That’s great Amjad.
I’ll try that!


Thanks for using Aspose.Cells for .NET.

Let us know if you face any other issue, we will be glad to help you asap.

Please also download and try the latest offline demos to get familiar with Aspose.Cells API quickly.

These demos can work with Visual Studio 2005, 2008 or 2010. Please read the readme.txt file before running the demos.