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", "remotes"), dependencies = TRUE)
remotes::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.

Copy Link

Version

Install

install.packages('openxlsx')

Monthly Downloads

397,276

Version

4.2.5.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Philipp Schauberger

Last Published

October 24th, 2022

Functions in openxlsx (4.2.5.1)

createNamedRegion

Create / delete a named region.
addWorksheet

Add a worksheet to a workbook
activeSheet

Get/set active sheet of the workbook
addCreator

Add another author to the meta data of the file.
all.equal

Check equality of workbooks
dataValidation

Add data validation to cells
copyWorkbook

Copy a Workbook object.
convertFromExcelRef

Convert excel column name to integer index
conditionalFormat

Add conditional formatting to cells
convertToDateTime

Convert from excel time number to R POSIXct type.
createWorkbook

Create a new Workbook object
convertToDate

Convert from excel date number to R Date type
createComment

create a Comment object
createStyle

Create a cell style
getTables

List Excel tables in a workbook
getStyles

Returns a list of all styles in the workbook
getCellRefs

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

Return the workbook default font
freezePane

Freeze a worksheet pane
deleteData

Delete cell data
getCreators

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

Merge cells within a worksheet
modifyBaseFont

Modify the default font
conditionalFormatting

Add conditional formatting to cells
getDateOrigin

Get the date origin an xlsx file is using
insertPlot

Insert the current plot into a worksheet
getNamedRegions

Get named regions
int2col

Convert integer to Excel column
getSheetNames

Get names of worksheets
insertImage

Insert an image into a worksheet
if_null_then

If NULL then ...
groupRows

Group Rows
groupColumns

Group columns
openxlsx_options

openxlsx Options
pageBreak

add a page break to a worksheet
protectWorksheet

Protect a worksheet from modifications
names

get or set worksheet names
openXL

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

Read from an Excel file or Workbook object
removeColWidths

Remove column widths from a worksheet
pageSetup

Set page margins, orientation and print scaling
protectWorkbook

Protect a workbook from modifications
readWorkbook

Read from an Excel file or Workbook object
removeCellMerge

Create a new Workbook object
renameWorksheet

Rename a worksheet
replaceStyle

Replace an existing cell style
removeFilter

Remove a worksheet filter
removeRowHeights

Remove custom row heights from a worksheet
removeComment

Remove a comment from a cell
setLastModifiedBy

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

Set worksheet column widths
saveWorkbook

save Workbook to file
removeWorksheet

Remove a worksheet from a workbook
loadWorkbook

Load an existing .xlsx file
setHeaderFooter

Set document headers and footers
removeTable

Remove an Excel table in a workbook
setFooter

Set footer for all worksheets
setHeader

Set header for all worksheets
makeHyperlinkString

create Excel hyperlink string
write.xlsx

write data to an xlsx file
worksheetOrder

Order of worksheets in xlsx file
sheets

Returns names of worksheets.
sheetVisible

Get worksheet visible state.
writeComment

write a cell comment
writeData

Write an object to a worksheet
showGridLines

Set worksheet gridlines to show or hide.
temp_xlsx

helper function to create tempory directory for testing purpose
writeDataTable

Write to a worksheet as an Excel table
writeFormula

Write a character vector as an Excel Formula
openxlsx

xlsx reading, writing and editing.
sheetVisibility

Get/set worksheet visible state
setRowHeights

Set worksheet row heights
openxlsxFontSizeLookupTable

Font Size Lookup tables
ungroupRows

Ungroup Rows
ungroupColumns

Ungroup Columns
addStyle

Add a style to a set of cells
buildWorkbook

Build Workbook
cloneWorksheet

Clone a worksheet to a workbook
col2int

Convert Excel column to integer
addFilter

Add column filters