openxlsx v4.1.4


Monthly downloads



Read, Write and Edit xlsx Files

Simplifies the creation of Excel .xlsx files by providing a high level interface to writing, styling and editing worksheets. Through the use of 'Rcpp', read/write times are comparable to the 'xlsx' and 'XLConnect' packages with the added benefit of removing the dependency on Java.



Build Status AppVeyor build status Coverage Status CRAN_Status_Badge CRAN RStudio mirror downloads

This R package simplifies the creation of .xlsx files by providing a high level interface to writing, styling and editing worksheets. Through the use of Rcpp, read/write times are comparable to the xlsx and XLConnect packages with the added benefit of removing the dependency on Java.


Stable version

Current stable version is available on CRAN via

install.packages("openxlsx", dependencies = TRUE)

Development version

install.packages(c("Rcpp", "devtools"), dependencies = TRUE)

Bug/feature request

Please let me know which version of openxlsx you are using when posting bug reports.




Authors and Contributors for the current release

@aavanesy, @ale275, @alexb523, @david-f1976, @davidgohel, @dovrosenberg, @JoshuaSturm, @SHAESEN2, @soliac, @theclue, and @ycphs

Functions in openxlsx

Name Description
createWorkbook Create a new Workbook object
getDateOrigin Get the date origin an xlsx file is using
dataValidation Add data validation to cells
getNamedRegions Get named regions
insertPlot Insert the current plot into a worksheet
int2col Convert integer to Excel column
getCellRefs Return excel cell coordinates from (x,y) coordinates
getBaseFont Return the workbook default font
conditionalFormat Add conditional formatting to cells
deleteData Delete cell data
freezePane Freeze a worksheet pane
createNamedRegion Create a named region.
mergeCells Merge cells within a worksheet
pageBreak add a page break to a worksheet
modifyBaseFont Modify the default font
createComment create a Comment object
copyWorkbook Copy a Workbook object.
removeColWidths Remove column widths from a worksheet
removeComment Remove a comment from a cell
makeHyperlinkString create Excel hyperlink string
pageSetup Set page margins, orientation and print scaling
loadWorkbook Load an existing .xlsx file
saveWorkbook save Workbook to file
createStyle Create a cell style
protectWorkbook Protect a workbook from modifications
getTables List Excel tables in a workbook
insertImage Insert an image into a worksheet
removeFilter Remove a worksheet filter
getSheetNames Get names of worksheets
protectWorksheet Protect a worksheet from modifications
openxlsx xlsx reading, writing and editing.
renameWorksheet Rename a worksheet
read.xlsx Read from an Excel file or Workbook object
readWorkbook Read from an Excel file or Workbook object
names get or set worksheet names
openXL Open a Microsoft Excel file (xls/xlsx) or an openxlsx Workbook
getStyles Returns a list of all styles in the workbook
setColWidths Set worksheet column widths
removeTable Remove an Excel table in a workbook
removeWorksheet Remove a worksheet from a workbook
setFooter Set footer for all worksheets
replaceStyle Replace an existing cell style
sheets Returns names of worksheets.
worksheetOrder Order of worksheets in xlsx file
showGridLines Set worksheet gridlines to show or hide.
removeRowHeights Remove custom row heights from a worksheet
write.xlsx write data to an xlsx file
sheetVisibility Get/set worksheet visible state
writeDataTable Write to a worksheet as an Excel table
sheetVisible Get worksheet visible state.
setHeader Set header for all worksheets
writeComment write a cell comment
writeFormula Write a character vector as an Excel Formula
setRowHeights Set worksheet row heights
removeCellMerge Create a new Workbook object
setHeaderFooter Set document headers and footers
writeData Write an object to a worksheet
all.equal Check equality of workbooks
convertToDate Convert from excel date number to R Date type
addWorksheet Add a worksheet to a workbook
convertToDateTime Convert from excel time number to R POSIXct type.
convertFromExcelRef Convert excel column name to integer index
addFilter Add column filters
conditionalFormatting Add conditional formatting to cells
cloneWorksheet Clone a worksheet to a workbook
addStyle Add a style to a set of cells
No Results!

Vignettes of openxlsx

No Results!

Last month downloads


Type Package
Date 2019-12-04
License MIT + file LICENSE
LinkingTo Rcpp
VignetteBuilder knitr
Encoding UTF-8
RoxygenNote 7.0.2
Collate 'CommentClass.R' 'HyperlinkClass.R' 'RcppExports.R' 'class_definitions.R' 'StyleClass.R' 'WorkbookClass.R' 'baseXML.R' 'borderFunctions.R' 'chartsheet_class.R' 'conditional_formatting.R' 'helperFunctions.R' 'loadWorkbook.R' 'onUnload.R' 'openXL.R' 'openxlsx.R' 'openxlsxCoerce.R' 'readWorkbook.R' 'sheet_data_class.R' 'workbook_column_widths.R' 'workbook_read_workbook.R' 'workbook_write_data.R' 'worksheet_class.R' 'wrappers.R' 'writeData.R' 'writeDataTable.R' 'writexlsx.R'
NeedsCompilation yes
Packaged 2019-12-06 12:16:01 UTC; ceadm
Repository CRAN
Date/Publication 2019-12-06 12:50:02 UTC

Include our badge in your README