
Last chance! 50% off unlimited learning
Sale ends in
Remove column widths from a worksheet
removeColWidths(wb, sheet, cols)
A workbook object
A name or index of a worksheet
Indices of columns to remove custom width (if any) from.
# NOT RUN {
## Create a new workbook
wb <- loadWorkbook(file = system.file("extdata","loadExample.xlsx", package = "openxlsx"))
## remove column widths in columns 1 to 20
removeColWidths(wb, 1, cols = 1:20)
# }
# NOT RUN {
saveWorkbook(wb, "removeColWidthsExample.xlsx", overwrite = TRUE)
# }
Run the code above in your browser using DataLab