Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Worksheet.AddPrintRange(CellRange) Method

Extends print range by merging with the specified range.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

void AddPrintRange(
    CellRange range
)

#Parameters

Name Type Description
range CellRange

A CellRange object that is the worksheet range to print.

#Remarks

If the worksheet has no print rage defined, the AddPrintRange method sets the print range. If the print range is already defined, the AddPrintRange method extends it by merging the two ranges.

#Example

// Define a print area on a worksheet.
CellRange printArea = worksheet["B1:F39"];
worksheet.SetPrintRange(printArea);

// Enlarge the print area by adding adjacent cells.
// An additional print area is created if you add non-adjacent cells to the print area.
worksheet.AddPrintRange(worksheet["B40:F50"]);

// Uncomment the following line to clear the print area and print the entire worksheet.
// worksheet.ClearPrintRange();
See Also