Free Support Forum - aspose.com

Convert to PDF - specific range/tab

Hi,
I need to convert specific tab/range to PDF, and not the whole spreadsheet.
I’ve tried saving to PDF as described in http://www.aspose.com/docs/display/cellsnet/Converting+to+PDF+Files but can’t find options to specify a tab.
Can you please advice.

Regards,
Pavel

Hi,


Please see the topic:
http://www.aspose.com/docs/display/cellsnet/Save+Each+Worksheet+to+a+Different+PDF+File

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.
e.g

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

See the document on printing or other PageSetup options that you may try:
http://www.aspose.com/docs/display/cellsnet/Setting+Print+Options

Thank you.


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

Hi,

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.