NativeExcel2 for .Net Developer's Reference

IWorksheet.StandardWidth Property

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

[Visual Basic]

Property Value

Double. 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.


This example sets the width of column one on Sheet1 to the standard width.

IWorksheet sheet = book.Worksheets["Sheet1"];
sheet.Cells.Columns[1].ColumnWidth = sheet.StandardWidth;
Dim sheet As IWorksheet = book.Worksheets("Sheet1")
sheet.Cells.Columns(1).ColumnWidth = sheet.StandardWidth
IWorksheet* sheet = book->Worksheets->Item[S"Sheet1"];
sheet->Cells->Columns->Item[1]->ColumnWidth = sheet->StandardWidth;

See Also

IWorksheet Interface | NativeExcel Namespace | StandardHeight Property