Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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