Remove custom column widths from a worksheet

Share:

Description

Remove custom column widths from a worksheet

Usage

1
removeColWidths(wb, sheet, cols)

Arguments

wb

A workbook object

sheet

A name or index of a worksheet

cols

Indices of colunss to remove custom width (if any) from.

Author(s)

Alexander Walker

See Also

setColWidths

Examples

1
2
3
4
5
6
## Create a new workbook
wb <- loadWorkbook(file = system.file("loadExample.xlsx", package = "openxlsx"))

## remove column widths in columns 1 to 20
removeColWidths(wb, 1, cols = 1:20)
saveWorkbook(wb, "removeColWidthsExample.xlsx", overwrite = TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.