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

397,276

Version

4.1.5

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Philipp Schauberger

Last Published

May 6th, 2020

Functions in openxlsx (4.1.5)

all.equal

Check equality of workbooks
conditionalFormat

Add conditional formatting to cells
cloneWorksheet

Clone a worksheet to a workbook
addFilter

Add column filters
convertToDate

Convert from excel date number to R Date type
conditionalFormatting

Add conditional formatting to cells
addCreator

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

Convert excel column name to integer index
addStyle

Add a style to a set of cells
addWorksheet

Add a worksheet to a workbook
freezePane

Freeze a worksheet pane
getSheetNames

Get names of worksheets
getBaseFont

Return the workbook default font
createStyle

Create a cell style
createWorkbook

Create a new Workbook object
getTables

List Excel tables in a workbook
convertToDateTime

Convert from excel time number to R POSIXct type.
insertImage

Insert an image into a worksheet
dataValidation

Add data validation to cells
getNamedRegions

Get named regions
copyWorkbook

Copy a Workbook object.
sheetVisible

Get worksheet visible state.
openxlsx

xlsx reading, writing and editing.
getDateOrigin

Get the date origin an xlsx file is using
deleteData

Delete cell data
names

get or set worksheet names
openXL

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

Create a new Workbook object
sheets

Returns names of worksheets.
readWorkbook

Read from an Excel file or Workbook object
getCellRefs

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

create a Comment object
getCreators

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

add a page break to a worksheet
createNamedRegion

Create a named region.
pageSetup

Set page margins, orientation and print scaling
removeRowHeights

Remove custom row heights from a worksheet
protectWorkbook

Protect a workbook from modifications
getStyles

Returns a list of all styles in the workbook
setFooter

Set footer for all worksheets
loadWorkbook

Load an existing .xlsx file
setLastModifiedBy

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

Insert the current plot into a worksheet
makeHyperlinkString

create Excel hyperlink string
setHeaderFooter

Set document headers and footers
int2col

Convert integer to Excel column
replaceStyle

Replace an existing cell style
renameWorksheet

Rename a worksheet
writeDataTable

Write to a worksheet as an Excel table
removeWorksheet

Remove a worksheet from a workbook
writeData

Write an object to a worksheet
removeFilter

Remove a worksheet filter
removeTable

Remove an Excel table in a workbook
mergeCells

Merge cells within a worksheet
saveWorkbook

save Workbook to file
removeComment

Remove a comment from a cell
writeComment

write a cell comment
removeColWidths

Remove column widths from a worksheet
setRowHeights

Set worksheet row heights
modifyBaseFont

Modify the default font
write.xlsx

write data to an xlsx file
sheetVisibility

Get/set worksheet visible state
protectWorksheet

Protect a worksheet from modifications
setColWidths

Set worksheet column widths
writeFormula

Write a character vector as an Excel Formula
read.xlsx

Read from an Excel file or Workbook object
setHeader

Set header for all worksheets
showGridLines

Set worksheet gridlines to show or hide.
worksheetOrder

Order of worksheets in xlsx file