GemBox.Spreadsheet

ExcelRow.AutoFit Method 

Automatically fits row height to the minimum size required for all lines in the row cells to be visible.

public void AutoFit();

Remarks

Auto-fit row height is a MS Excel feature and not a file format feature. When rows are auto-fit in MS Excel user interface, MS Excel will calculate current character heights and set row height to the new numeric value.

This method will set Height to the approximate value (maxLinesCount * 255).

See Also

ExcelRow Class | GemBox.Spreadsheet Namespace