Hello,
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,
Sheri