Skip to main content

WorksheetDisplayArea.SetSize(String, Int32, Int32) Method

Defines the number of visible columns and rows for the specified worksheet.

Namespace: DevExpress.Web.ASPxSpreadsheet

Assembly: DevExpress.Web.ASPxSpreadsheet.v24.1.dll

NuGet Package: DevExpress.Web.Office

Declaration

public void SetSize(
    string worksheetName,
    int maxColumnCount,
    int maxRowCount
)

Parameters

Name Type Description
worksheetName String

A string value specifying the name of the worksheet whose visible area should be restricted.

maxColumnCount Int32

An integer that represents the maximum number of columns to be displayed in a worksheet.

maxRowCount Int32

An integer that represents the maximum number of rows to be displayed in a worksheet.

Remarks

The following example demonstrates how to display only 6 columns and 20 rows in a worksheet.

ASPxSpreadsheet1.WorksheetDisplayArea.SetSize("Vehicle Loan Payment Calculator", 6, 20);

The image below shows the result.

Spreadsheet-WorksheetDisplayArea.png

Note that the SetSize method does not affect API methods, so you can change cell content and formatting in code.

To restore the restricted visible area to the default size with all rows and columns visible, use the WorksheetDisplayArea.Reset method.

See Also