We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

'Ignore print areas' when exporting to PDF

In Excel there is a nice option when saving Excel workbook to PDF called ‘Ignore print areas’,

Is there any property in Aspose object model which can be used, so the result of Workbook.Save(PdfPath, Aspose.Cells.SaveFormat.Pdf) will also ignore the print areas?

Thanks in advance.


Thanks for your posting and using Aspose.Cells.

Please use the following code to ignore the print area of the worksheet.

Worksheet.PageSetup.PrintArea = “”;

Thank you for suggestion.
In general the approach works fine. But for some documents it doesn't work (like the one in attach)
What can I do wrong?

The code I am using:

Dim AsposeDocument As New Aspose.Cells.Workbook(fileName)
If AsposeDocument.Worksheets.Count > 0 _
AndAlso AsposeDocument.Worksheets.ActiveSheetIndex >= 0 Then
AsposeDocument.Worksheets(AsposeDocument.Worksheets.ActiveSheetIndex).PageSetup.PrintArea = ""
End If

AsposeDocument.Save(PdfPath, Aspose.Cells.SaveFormat.Pdf)


Thanks for the template file and sample code.

Please try our latest version/fix: Aspose.Cells for .NET v8.7.1.4
I have tested your scenario/ case using your template file and sample code with v8.7.1.4, it works fine. Your template file has 4 pages (in total) for the only worksheet in it (you may confirm this by taking print preview in MS Excel). The output PDF file (attached) has also 4 pages.

Let us know if there is still any issue.

Thank you.


Thanks a lot for reply. The latest Aspose Cells version really fixes the problem. I will apply it in our application.



Good to know that your issue is sorted out by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.