Learn R Programming

⚠️There's a newer version (4.2.8) of this package.Take me there.

openxlsx

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.

Installation

Stable version

Current stable version is available on CRAN via

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

Development version

install.packages(c("Rcpp", "devtools"), dependencies = TRUE)
require(devtools)
install_github("ycphs/openxlsx")

Bug/feature request

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

packageVersion("openxlsx")

News

Here.

Authors and Contributors for the current release

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

Copy Link

Version

Install

install.packages('openxlsx')

Monthly Downloads

392,565

Version

4.2.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Philipp Schauberger

Last Published

September 17th, 2020

Functions in openxlsx (4.2.2)

addCreator

Add another author to the meta data of the file.
conditionalFormatting

Add conditional formatting to cells
convertFromExcelRef

Convert excel column name to integer index
conditionalFormat

Add conditional formatting to cells
addFilter

Add column filters
addWorksheet

Add a worksheet to a workbook
cloneWorksheet

Clone a worksheet to a workbook
deleteData

Delete cell data
dataValidation

Add data validation to cells
createComment

create a Comment object
createStyle

Create a cell style
createNamedRegion

Create a named region.
getDateOrigin

Get the date origin an xlsx file is using
removeCellMerge

Create a new Workbook object
createWorkbook

Create a new Workbook object
saveWorkbook

save Workbook to file
int2col

Convert integer to Excel column
getNamedRegions

Get named regions
insertPlot

Insert the current plot into a worksheet
readWorkbook

Read from an Excel file or Workbook object
getTables

List Excel tables in a workbook
groupColumns

Group columns
mergeCells

Merge cells within a worksheet
writeComment

write a cell comment
write.xlsx

write data to an xlsx file
writeFormula

Write a character vector as an Excel Formula
setColWidths

Set worksheet column widths
freezePane

Freeze a worksheet pane
getBaseFont

Return the workbook default font
getSheetNames

Get names of worksheets
convertToDate

Convert from excel date number to R Date type
getStyles

Returns a list of all styles in the workbook
convertToDateTime

Convert from excel time number to R POSIXct type.
copyWorkbook

Copy a Workbook object.
openxlsx

xlsx reading, writing and editing.
getCellRefs

Return excel cell coordinates from (x,y) coordinates
removeTable

Remove an Excel table in a workbook
ungroupRows

Ungroup Rows
protectWorkbook

Protect a workbook from modifications
worksheetOrder

Order of worksheets in xlsx file
pageSetup

Set page margins, orientation and print scaling
removeWorksheet

Remove a worksheet from a workbook
modifyBaseFont

Modify the default font
pageBreak

add a page break to a worksheet
groupRows

Group Rows
removeColWidths

Remove column widths from a worksheet
removeComment

Remove a comment from a cell
names

get or set worksheet names
openXL

Open a Microsoft Excel file (xls/xlsx) or an openxlsx Workbook
insertImage

Insert an image into a worksheet
protectWorksheet

Protect a worksheet from modifications
makeHyperlinkString

create Excel hyperlink string
getCreators

Add another author to the meta data of the file.
read.xlsx

Read from an Excel file or Workbook object
setFooter

Set footer for all worksheets
loadWorkbook

Load an existing .xlsx file
removeFilter

Remove a worksheet filter
setHeaderFooter

Set document headers and footers
removeRowHeights

Remove custom row heights from a worksheet
setHeader

Set header for all worksheets
setLastModifiedBy

Add another author to the meta data of the file.
renameWorksheet

Rename a worksheet
setRowHeights

Set worksheet row heights
sheetVisibility

Get/set worksheet visible state
replaceStyle

Replace an existing cell style
sheetVisible

Get worksheet visible state.
sheets

Returns names of worksheets.
showGridLines

Set worksheet gridlines to show or hide.
writeData

Write an object to a worksheet
ungroupColumns

Ungroup Columns
writeDataTable

Write to a worksheet as an Excel table
addStyle

Add a style to a set of cells
all.equal

Check equality of workbooks