Currently, cells with WrapText enabled are ignored when calculating column width via AutoFitColumns(). We want to give users control over how such cells contribute to the calculated width.
Add a WrappedTextAutofitMode property to ExcelTextSettings, backed by an eWrappedTextAutofitMode enum with the following modes:
Skip — wrapped cells are ignored during autofit (default; preserves current behaviour).
FullText — the entire cell text is measured as a single line.
SplitNewLine — the text is split on explicit line breaks (CR, LF, CRLF); the widest resulting line drives the column width.
SplitWord — the text is split on whitespace (space, tab, line breaks) and hyphens (U+002D, U+2010); the widest resulting segment drives the column width. Visible break characters (hyphens) are included in the segment width; whitespace is not.
Applies to the generic font-metrics measurer.
Currently, cells with WrapText enabled are ignored when calculating column width via AutoFitColumns(). We want to give users control over how such cells contribute to the calculated width.
Add a WrappedTextAutofitMode property to ExcelTextSettings, backed by an eWrappedTextAutofitMode enum with the following modes:
Skip— wrapped cells are ignored during autofit (default; preserves current behaviour).FullText— the entire cell text is measured as a single line.SplitNewLine— the text is split on explicit line breaks (CR, LF, CRLF); the widest resulting line drives the column width.SplitWord— the text is split on whitespace (space, tab, line breaks) and hyphens (U+002D, U+2010); the widest resulting segment drives the column width. Visible break characters (hyphens) are included in the segment width; whitespace is not.Applies to the generic font-metrics measurer.