Skip to content

Commit

Permalink
[options] add "openxlsx2.maxWidth"
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Nov 12, 2023
1 parent a0ac1bd commit 0e66669
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/converters.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,8 @@ calc_col_width <- function(base_font, col_width) {
# to the expected widths
widths <- trunc((as.numeric(col_width) * mdw + 5) / mdw * 256) / 256
widths <- round(widths, 3)
if (any(sel <- widths > getOption("openxlsx2.maxWidth"))) {
widths[sel] <- getOption("openxlsx2.maxWidth")
}
widths
}

0 comments on commit 0e66669

Please sign in to comment.