Share via


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)

Syntax

'Declaration
Public Property StandardWidth As Double
public double StandardWidth { get; set; }

Property Value

Type: System.Double
The standard (default) width of all the columns in the worksheet.

Remarks

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.

Examples

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 Sub DisplayStandardWidth()
    MsgBox("The default column width is " & _
        Me.StandardWidth.ToString() & " characters.")
End Sub
private void DisplayStandardWidth()
{
    MessageBox.Show("The default column width is " +
        this.StandardWidth.ToString() + " characters.");
}

.NET Framework Security

See Also

Reference

WorksheetBase Class

Microsoft.Office.Tools.Excel Namespace