Worksheet.StandardWidth Property (2007 System)
Gets or sets the standard (default) width of all the columns in the worksheet.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public Property StandardWidth As Double
'Usage
Dim instance As Worksheet
Dim value As Double
value = instance.StandardWidth
instance.StandardWidth = value
public double StandardWidth { get; set; }
public:
property double StandardWidth {
double get ();
void set (double value);
}
public function get StandardWidth () : double
public function set StandardWidth (value : double)
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.