HotXLS Docs

StandardWidth property

Returns or sets the standard (default) width of all the columns in the Worksheet. Read/write Double

Syntax

property StandardWidth: Double;

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

Save retention

Classic file and stream saves retain the worksheet's actual standard width, including the default8.43 setting; reopening a saved workbook does not replace it with a different legacy default

Each worksheet keeps its own standard width, and explicitly sized columns retain their independent widths

Widths remain subject to the existing Classic storage precision; the qualification covers library file/stream output and repeated source-free reopen, without adding a native application or rendering qualification

Loaded Classic default widths

Version 2.384.454 retains the actual loaded default-column-width declaration when an otherwise unchanged Classic sheet is saved or copied with its worksheet

An original default-width record remains in its original units, and an absent optional standard-width declaration stays absent; an existing standard-width value retains its original stored precision

Assigning the current representable value leaves the loaded declaration and read-view generation unchanged; a real change discards that source authority, and changing back later remains an explicit edit

Qualification includes an actual source whose 48-point native column grid formerly became 49.8 points after an untouched roundtrip; ordinary output and source-free whole-sheet copying retain the original grid under the same source font context

The existing numeric getter and general conversion rules are unchanged; this retention fix does not add a general font, DPI or native character-width measurement formula

Example

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

With Workbook.Sheets[1] do begin
   Cells.Columns[1].ColumnWidth := StandardWidth;
end;