NativeExcel2 for .Net Developer's Reference

IPageSetup.PrintAreaDefined Property

Gets a value that indicates whether the PrintArea is defined.

[Visual Basic]
PropertyReadOnlyPrintAreaDefinedAsBoolean
[C#]
boolPrintAreaDefined{get;}
[C++]
__propertyboolget_PrintAreaDefined();
[JScript]
functiongetPrintAreaDefined():bool

Property Value

True if PrintArea is defined; otherwise, false.

Example

This example clears the PrintArea if it's defined.

[C#]
if (book.Worksheets[1].PageSetup.PrintAreaDefined)   
    book.Worksheets[1].PageSetup.PrintArea = "";
[VisualBasic]
If book.Worksheets(1).PageSetup.PrintAreaDefined Then
   book.Worksheets(1).PageSetup.PrintArea = ""
End If
[C++]
if (book->Worksheets->Item[1]->PageSetup->PrintAreaDefined) 
    book->Worksheets->Item[1]->PageSetup->PrintArea = S"";

See Also

IPageSetup Interface | NativeExcel Namespace | PageSetup Property | PrintArea Property