Sets the range to be printed by using row and column indexes.
[Visual Basic] Sub SetPrintArea( _ ByVal RowStart As Integer, _ ByVal ColStart As Integer, _ ByVal RowEnd As Integer, _ ByVal ColEnd As Integer _ ) [C#] void SetPrintArea( int RowStart, int ColStart, int RowEnd, int ColEnd ); [C++] void SetPrintArea( int RowStart, int ColStart, int RowEnd, int ColEnd ); [JScript] function SetPrintArea( int RowStart, int ColStart, int RowEnd, int ColEnd );
This example sets the print area to cells A1:C5 on worksheet one.
[C#]
book.Worksheets[1].PageSetup.SetPrintArea(1,1,5,3);
[Visual Basic]
book.Worksheets(1).PageSetup.SetPrintArea(1,1,5,3)
[C++]
book->Worksheets->Item[1]->PageSetup->SetPrintArea(1,1,5,3);
IPageSetup Interface | NativeExcel Namespace | PageSetup Property | PrintArea Property | PrintAreaDefined Property