Learn R Programming

⚠️There's a newer version (4.2.7.1) 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

340,340

Version

4.2.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

October 27th, 2020

Functions in openxlsx (4.2.3)

convertFromExcelRef

Convert excel column name to integer index
dataValidation

Add data validation to cells
deleteData

Delete cell data
createNamedRegion

Create a named region.
getStyles

Returns a list of all styles in the workbook
createComment

create a Comment object
getSheetNames

Get names of worksheets
getDateOrigin

Get the date origin an xlsx file is using
getNamedRegions

Get named regions
addStyle

Add a style to a set of cells
addWorksheet

Add a worksheet to a workbook
createStyle

Create a cell style
convertToDate

Convert from excel date number to R Date type
all.equal

Check equality of workbooks
cloneWorksheet

Clone a worksheet to a workbook
mergeCells

Merge cells within a worksheet
createWorkbook

Create a new Workbook object
read.xlsx

Read from an Excel file or Workbook object
protectWorksheet

Protect a worksheet from modifications
modifyBaseFont

Modify the default font
insertImage

Insert an image into a worksheet
loadWorkbook

Load an existing .xlsx file
groupRows

Group Rows
convertToDateTime

Convert from excel time number to R POSIXct type.
copyWorkbook

Copy a Workbook object.
setHeaderFooter

Set document headers and footers
makeHyperlinkString

create Excel hyperlink string
removeRowHeights

Remove custom row heights from a worksheet
groupColumns

Group columns
replaceStyle

Replace an existing cell style
int2col

Convert integer to Excel column
renameWorksheet

Rename a worksheet
getTables

List Excel tables in a workbook
insertPlot

Insert the current plot into a worksheet
removeFilter

Remove a worksheet filter
write.xlsx

write data to an xlsx file
conditionalFormat

Add conditional formatting to cells
openxlsx

xlsx reading, writing and editing.
pageSetup

Set page margins, orientation and print scaling
protectWorkbook

Protect a workbook from modifications
pageBreak

add a page break to a worksheet
setLastModifiedBy

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

Write an object to a worksheet
writeDataTable

Write to a worksheet as an Excel table
sheets

Returns names of worksheets.
sheetVisible

Get worksheet visible state.
saveWorkbook

save Workbook to file
setColWidths

Set worksheet column widths
freezePane

Freeze a worksheet pane
conditionalFormatting

Add conditional formatting to cells
getBaseFont

Return the workbook default font
writeComment

write a cell comment
getCellRefs

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

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

get or set worksheet names
writeFormula

Write a character vector as an Excel Formula
removeComment

Remove a comment from a cell
setHeader

Set header for all worksheets
showGridLines

Set worksheet gridlines to show or hide.
setFooter

Set footer for all worksheets
removeColWidths

Remove column widths from a worksheet
worksheetOrder

Order of worksheets in xlsx file
ungroupRows

Ungroup Rows
readWorkbook

Read from an Excel file or Workbook object
removeCellMerge

Create a new Workbook object
openXL

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

Remove an Excel table in a workbook
ungroupColumns

Ungroup Columns
removeWorksheet

Remove a worksheet from a workbook
sheetVisibility

Get/set worksheet visible state
setRowHeights

Set worksheet row heights
addCreator

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

Add column filters