Back to Devexpress

Measure Units in Spreadsheet Documents

officefileapi-14919-spreadsheet-document-api-spreadsheet-document-measure-units.md

latest3.3 KB
Original Source

Measure Units in Spreadsheet Documents

  • Sep 19, 2023
  • 2 minutes to read

You can select a single unit of measurement to specify various distance values of a workbook (such as column width, row height and page margins). To do this, set the Workbook.Unit property.

|

Unit of Measurement

|

Description

|

How to Use

| | --- | --- | --- | |

Document

|

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

|

Centimeter (1 inch is equal to 2.54 centimeters)

|

Set the Unit property to DocumentUnit.Centimeter.

| |

Millimeter

|

Millimeter (10 millimeters are equal to 1 centimeter)

|

Set the Unit property to DocumentUnit.Millimeter.

| |

Inch

|

Inch

|

Set the Unit property to DocumentUnit.Inch.

| |

Point

|

Point (1 inch is equal to 72 points)

|

Set the Unit property to DocumentUnit.Point.

| |

Pixel

|

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.

Worksheet.DefaultColumnWidthInPixels

Column.WidthInPixels

| |

Character

|

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.

Worksheet.DefaultColumnWidthInCharacters

CellRange.ColumnWidthInCharacters

Column.WidthInCharacters

|

A workbook’s units of measurement specified by the Unit property are used in the following cases.

See Also

How to: Specify Row Height or Column Width

How to: Set Page Margins