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
Get
Set
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.