- 2 minutes to read
The ASPxSpreadsheet control allows you to select a unit of measurement for various distance values of a workbook (such as column width and row height). To set a single unit of measurement, use the Unit property of the IWorkbook object returned by ASPxSpreadsheet.Document.
Unit of Measurement
How to Use
Document (1 document unit is equal to 1/300 of an inch). This is a default measure unit of a workbook.
Set the Unit property to DocumentUnit.Document.
Centimeter (1 inch is equal to 2.54 centimeters)
Set the Unit property to DocumentUnit.Centimeter.
Millimeter (10 millimeters are equal to 1 centimeter)
Set the Unit property to DocumentUnit.Millimeter.
Set the Unit property to DocumentUnit.Inch.
Point (1 inch is equal to 72 points)
Set the Unit property to DocumentUnit.Point.
Pixel (1 inch is equal to 96 pixels). You can use this unit to set column width.
Use the following properties to set column width in pixels.
Character (the width of the zero character in the font specified by the built-in Normal style). You can use this unit to set column width.
Use the following properties to set column width in characters.
A workbook's units of measurement specified by the Unit property are used in the following cases.
- When you specify a column width via the Worksheet.DefaultColumnWidth, Range.ColumnWidth or Column.Width property.
- When you specify a row height via the Worksheet.DefaultRowHeight, Range.RowHeight or Row.Height property.
- When you specify page margins via the properties of the Margins object.