WorksheetBase.StandardWidth Property

 

Gets or sets the standard (default) width of all the columns in the worksheet.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

public double StandardWidth { get; set; }

Property Value

Type: System.Double

The standard (default) width of all the columns in the worksheet.

One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used.

The following code example uses the StandardWidth property to display the default width of all the columns in the current worksheet.

This example is for a document-level customization.

private void DisplayStandardWidth()
{
    MessageBox.Show("The default column width is " +
        this.StandardWidth.ToString() + " characters.");
}
Return to top
Show: