setColumnWidth-methods

0th

Percentile

Setting the width of a column in a worksheet

Sets the width of a column in a worksheet.

Keywords
methods, utilities
Usage
# S4 method for workbook,character
setColumnWidth(object,sheet,column,width)
# S4 method for workbook,numeric
setColumnWidth(object,sheet,column,width)
Arguments
object

The '>workbook to use

sheet

The name or index of the sheet

column

The index of the column to resize

width

The width of the specified column in units of 1/256th of a character width. If width = -1 (default), the column is auto-sized. If negative otherwise, the column will be sized to the sheet's default column width.

Details

Note that the arguments sheet, column and width are vectorized. As such the column width of multiple columns (potentially on different sheets) can be set with one method call.

'>workbook, setRowHeight

Aliases
• setColumnWidth
• setColumnWidth-methods
• setColumnWidth,workbook,character-method
• setColumnWidth,workbook,numeric-method
Examples
# NOT RUN {
# mtcars xlsx file from demoFiles subfolder of package XLConnect
mtcarsFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")