Skip to content

Extend setRowHeights to accept parameter(s) "auto"#382

Open
DavidBreuer wants to merge 2 commits intoawalker89:masterfrom
DavidBreuer:master
Open

Extend setRowHeights to accept parameter(s) "auto"#382
DavidBreuer wants to merge 2 commits intoawalker89:masterfrom
DavidBreuer:master

Conversation

@DavidBreuer
Copy link

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.

@DavidBreuer
Copy link
Author

@s439 Thanks for the approval! I resolved the conflicts, so the PR should be ready to be merged.

@SamuelAllain
Copy link

Thanks for the feature @DavidBreuer ! Hope it will be merged soon

@Tom-K-UKRI
Copy link

Thanks for this - I found it because I was searching for exactly this feature. Would be great to see this merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants