openxlsx
openxlsx copied to clipboard
Extend setRowHeights to accept parameter(s) "auto"
Extend setRowHeights to accept parameter(s) "auto" to automatically scale row heights. For long cell entries, the row height is automatically adjusted (and text wrapping enabled) so that all lines are visible.
The use of the "auto" parameter(s) is analogue to the setColWidths function: setRowHeights(wb, sheet, rows = c(1, 2, 8, 4, 6), heights = c(30, "auto", 15, 15, 30))
The computation of the text width currently uses the basic strwidth function but can certainly be improved. For now I introduced a "factor" parameter to adjust the text width for different fonts or font families.
@s439 Thanks for the approval! I resolved the conflicts, so the PR should be ready to be merged.
Thanks for the feature @DavidBreuer ! Hope it will be merged soon
Thanks for this - I found it because I was searching for exactly this feature. Would be great to see this merged