AdjustHeight([MaxHeight: Double = -1;][MinHeight: Double = -1]);
AdjustHeight(MaxHeight: double; MinHeight: double);
MaxHeight. Maximum row height that can be set when the row is autofit. Default value is -1. The maximum height is limited with the maximum height of content of the range cells. The value is indicated in millimeters.
MinHeight. Minimum row height that can be set when the row is autofit. Default value is -1. The minimum height is limited with the minimum height of content of the range cells. The value is indicated in millimeters.
The AdjustHeight method automatically adjusts height of range cells to fit cells' contents.
Autofit is performed to to achieve the best fit of contents of all cells in the range. Autofit takes into account font formats, alignment and cell margins. It also depends on values of the MaxHeight and MinHeight parameters that can be defined for this method.
Comment. If text wrap (words by words or syllables by syllables) is set for a range cell, height of all lines contained in the cell is taken into account when automatically adjusting the height. Hyphenation is kept. This can be applied both to single or united cells with the preset text hyphenation.
Source data cell:
A0 cell after applying AdjustHeight method:
See also: