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

Free Support Forum - aspose.com

Page Setup PrintErrorType Not Working


I am trying to create a PDF from a worksheet with errors on it and have #NA appear in the cell instead of the error.

If I print preview my file with the setting in Excel, it shows the #NA as expected.

If I use Aspose to open the file and save as PDF, the original Excel error is show no matter what setting I use for PageSetup.PrintErrorType - blank, dash, or NA.

See attached screenshot:
PrintErrorTypeIssue.png (29.5 KB)

My code is as follows:

foreach (Aspose.Cells.Worksheet wSheet in wBook.Worksheets)
    if (!wSheet.IsVisible) continue;

    wSheet.PageSetup.Order = Aspose.Cells.PrintOrderType.OverThenDown;
    wSheet.PageSetup.PrintComments = PrintCommentType;

    // comment must be set visible first if it is invisible.
    foreach (Aspose.Cells.Comment sheetComment in wSheet.Comments)
        sheetComment.IsVisible = (PrintCommentType != Aspose.Cells.PrintCommentsType.PrintNoComments);

    wSheet.PageSetup.PrintErrors = PrintErrorType;

    wSheet.PageSetup.PrintHeadings = PrintHeadings;

    if (!PrintTitleRows) {
        wSheet.PageSetup.PrintTitleRows = String.Empty;

    if (!PrintTitleColumns) {
        wSheet.PageSetup.PrintTitleColumns = String.Empty;

Here is my sample Excel file: PageSetup-CommentsErrorsHeadingsNotesTitles.zip (10.0 KB)

I am using Aspose.Cells .Net 18.4.1.

Thanks in advance,



Thanks for the template file and sample code with screenshot.

After an initial test, I am able to observe the issue as you mentioned by converting your template file to PDF file format. I found that Page Setup PrintErrorType not working in Excel to PDF rendering. I confirmed if we print preview your file with the setting in Excel, it shows the #NA as expected.

I have logged a ticket with an id “CELLSNET-46087” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.


Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSNET-46087 now. We will soon provide the fix after performing QA and including other enhancements and fixes.


Please try our latest version/fix: Aspose.Cells for .NET v18.4.5:

Your issue should be fixed in it.

Let us know your feedback.

Retested this and the issue is resolved.

Thanks for the quick fix.



Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.

The issues you have found earlier (filed as CELLSNET-46087) have been fixed in this update. Please also check the document/article for your reference: https://docs.aspose.com/display/cellsnet/Installation