Skip to main content
Row

ISpreadsheetComponent.Unit Property

Gets or sets a unit of measure used in the workbook.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

DocumentUnit Unit { get; set; }

Property Value

Type Description
DocumentUnit

The DocumentUnit enumeration member. It is expected to be set to the DocumentUnit.Document value by default.

Available values:

Name Description
Document

Specifies documents (one three-hundredths of an inch) as measurement units.

Inch

Specifies inches as measurement units.

Millimeter

Specifies millimeters as measurement units.

Centimeter

Specifies centimeters as measurement units.

Point

Specifies points as measurement units.

Remarks

By default, all workbooks loaded in the SpreadsheetControl gets the unit of measurement from the SpreadsheetControl.Unit property value. To specify the unit of measurement for the workbook explicitly, use the SpreadsheetControl.Document.Unit notation.

When the unit of measurement is changed, the ISpreadsheetComponent.UnitChanging and ISpreadsheetComponent.UnitChanged events occur.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Unit property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also