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", "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

327,124

Version

4.2.5.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

February 6th, 2023

Functions in openxlsx (4.2.5.2)

addStyle

Add a style to a set of cells
addWorksheet

Add a worksheet to a workbook
createComment

create a Comment object
conditionalFormat

Add conditional formatting to cells
convertToDate

Convert from excel date number to R Date type
createWorkbook

Create a new Workbook object
convertFromExcelRef

Convert excel column name to integer index
copyWorkbook

Copy a Workbook object.
createStyle

Create a cell style
dataValidation

Add data validation to cells
convertToDateTime

Convert from excel time number to R POSIXct type.
getStyles

Returns a list of all styles in the workbook
getCreators

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

Add conditional formatting to cells
getBaseFont

Return the workbook default font
freezePane

Freeze a worksheet pane
deleteData

Delete cell data
getDateOrigin

Get the date origin an xlsx file is using
getTables

List Excel tables in a workbook
if_null_then

If NULL then ...
modifyBaseFont

Modify the default font
mergeCells

Merge cells within a worksheet
insertImage

Insert an image into a worksheet
makeHyperlinkString

create Excel hyperlink string
loadWorkbook

Load an existing .xlsx file
groupColumns

Group columns
getSheetNames

Get names of worksheets
getNamedRegions

Get named regions
groupRows

Group Rows
read.xlsx

Read from an Excel file or Workbook object
pageBreak

add a page break to a worksheet
getCellRefs

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

Protect a worksheet from modifications
openxlsx_options

openxlsx Options
int2col

Convert integer to Excel column
openxlsx

xlsx reading, writing and editing.
insertPlot

Insert the current plot into a worksheet
names

get or set worksheet names
openXL

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

Remove custom row heights from a worksheet
protectWorkbook

Protect a workbook from modifications
pageSetup

Set page margins, orientation and print scaling
removeFilter

Remove a worksheet filter
removeColWidths

Remove column widths from a worksheet
removeComment

Remove a comment from a cell
renameWorksheet

Rename a worksheet
setFooter

Set footer for all worksheets
setHeader

Set header for all worksheets
openxlsxFontSizeLookupTable

Font Size Lookup tables
removeWorksheet

Remove a worksheet from a workbook
removeTable

Remove an Excel table in a workbook
replaceStyle

Replace an existing cell style
sheetVisible

Get worksheet visible state.
sheets

Returns names of worksheets.
setColWidths

Set worksheet column widths
saveWorkbook

save Workbook to file
setRowHeights

Set worksheet row heights
sheetVisibility

Get/set worksheet visible state
showGridLines

Set worksheet gridlines to show or hide.
writeData

Write an object to a worksheet
writeComment

write a cell comment
setHeaderFooter

Set document headers and footers
setLastModifiedBy

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

Order of worksheets in xlsx file
temp_xlsx

helper function to create tempory directory for testing purpose
ungroupColumns

Ungroup Columns
ungroupRows

Ungroup Rows
removeCellMerge

Create a new Workbook object
readWorkbook

Read from an Excel file or Workbook object
write.xlsx

write data to an xlsx file
writeFormula

Write a character vector as an Excel Formula
writeDataTable

Write to a worksheet as an Excel table
col2int

Convert Excel column to integer
addFilter

Add column filters
addCreator

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

Check equality of workbooks
cloneWorksheet

Clone a worksheet to a workbook
createNamedRegion

Create / delete a named region.
activeSheet

Get/set active sheet of the workbook
buildWorkbook

Build Workbook