getColWidths | R Documentation |
These two functions allow us to query and set the widths of columns in an Excel spreadsheet.
getColWidths(sh)
setColWidth(sh, width, colIds = seq(along = width), update = TRUE)
sh |
the |
width |
a vector of widths for the columns. |
colIds |
the identifiers of the columns whose widths are being set |
update |
a logical value indicating whether we should update the worksheet document in the xlsx file or just make the changes in the XML file. |
getColWidths
returns a numeric vector
of widths, or NULL
if none of the columns
have a non-default width.
Only the widths of the columns whose width has been explicitly changed
are returned.
setColWidth
Duncan Temple Lang
sh = workbook(system.file("SampleDocs", "Workbook1.xlsx", package = "RExcelXML"))[[1]]
getColWidths(sh)
dim(sh)
setColWidth(sh, c(20, 20, 30), update = FALSE)
getColWidths(sh)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.