Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Description

Sets or returns the default column width, in points (1/72 of an inch).

C#
vb.net

Examples

C#
vb.net

Remarks

The maximum width of an Excel column is defined (by Excel) as 255 characters in the workbook's 'Normal' font. Because of this, workbooks with different normal fonts may have different maximum values for this property.

Depending on your version of Excel, the default normal font is either 10pt Arial (Excel 2003 and earlier) or 11pt Calibri (Excel 2007 and later). Both of those have a character width of about 5.25 points, so the default maximum value for StandardWidth is 1338.

No matter your workbook's normal font, ExcelWriter will constrain this property to a valid range.

Because Excel uses character widths instead of points internally you may see some small error when reading values from this property, usually of less than a point.

  • No labels