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

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

Copy Link

Version

Install

install.packages('openxlsx')

Monthly Downloads

451,411

Version

4.1.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Philipp Schauberger

Last Published

December 6th, 2019

Functions in openxlsx (4.1.4)

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