[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PagePrintingEventArgs.SkipThisPage

SkipThisPage Property

SkipThisPage

Gets or sets a value indicating whether this page should be skipped in output.

This property is typically used in the PagePrinting event to determine whether the page will be omitted when exporting or printing.

Declaration
public bool SkipThisPage { get; set; }
Public Property SkipThisPage As Boolean
Property Value
Type Description
bool
<a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if this page should be skipped in output.

Otherwise, false. The default value is false.

Examples
worksheet.Range["A1:A96"].Value = 1;
bool skipThisPage = false;
PdfSaveOptions options = new PdfSaveOptions();
options.PagePrinting += (sender, e) =>
{
    if (e.PageNumber == 2)
    {
        e.SkipThisPage = true;
        skipThisPage = e.SkipThisPage;
    }
};
using MemoryStream stream = new MemoryStream();
workbook.Save(stream, options);