Setting the width of a column in a worksheet
Sets the width of a column in a worksheet.
1 2 3 4
The name or index of the sheet
The index of the column to resize
The width of the specified column in units of 1/256th of a character width.
Note that the arguments
vectorized. As such the column width of multiple columns (potentially on
different sheets) can be set with one method call.
Mirai Solutions GmbH http://www.mirai-solutions.com
1 2 3 4 5 6 7 8 9
# mtcars xlsx file from demoFiles subfolder of package XLConnect mtcarsFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect") # Load workbook wb <- loadWorkbook(mtcarsFile) # Sets the column width of the 3rd column on sheet 'mtcars' # to 4000/256th (= 15.625) character width setColumnWidth(wb, sheet = "mtcars", column = 3, width = 4000)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.