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

346,643

Version

4.2.5

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

December 14th, 2021

Functions in openxlsx (4.2.5)

all.equal

Check equality of workbooks
buildWorkbook

Build Workbook
convertToDateTime

Convert from excel time number to R POSIXct type.
copyWorkbook

Copy a Workbook object.
activeSheet

Get/set active sheet of the workbook
addStyle

Add a style to a set of cells
getCreators

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

Get the date origin an xlsx file is using
convertFromExcelRef

Convert excel column name to integer index
deleteData

Delete cell data
convertToDate

Convert from excel date number to R Date type
freezePane

Freeze a worksheet pane
mergeCells

Merge cells within a worksheet
modifyBaseFont

Modify the default font
pageBreak

add a page break to a worksheet
openxlsx_options

openxlsx Options
groupColumns

Group columns
addCreator

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

Read from an Excel file or Workbook object
createWorkbook

Create a new Workbook object
addFilter

Add column filters
groupRows

Group Rows
insertPlot

Insert the current plot into a worksheet
addWorksheet

Add a worksheet to a workbook
getStyles

Returns a list of all styles in the workbook
createStyle

Create a cell style
createComment

create a Comment object
getTables

List Excel tables in a workbook
dataValidation

Add data validation to cells
int2col

Convert integer to Excel column
setHeader

Set header for all worksheets
removeRowHeights

Remove custom row heights from a worksheet
read.xlsx

Read from an Excel file or Workbook object
setFooter

Set footer for all worksheets
protectWorksheet

Protect a worksheet from modifications
removeFilter

Remove a worksheet filter
getBaseFont

Return the workbook default font
names

get or set worksheet names
getCellRefs

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

Remove an Excel table in a workbook
openXL

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

Set document headers and footers
removeWorksheet

Remove a worksheet from a workbook
setLastModifiedBy

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

Load an existing .xlsx file
openxlsx

xlsx reading, writing and editing.
worksheetOrder

Order of worksheets in xlsx file
makeHyperlinkString

create Excel hyperlink string
openxlsxFontSizeLookupTable

Font Size Lookup tables
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
protectWorkbook

Protect a workbook from modifications
pageSetup

Set page margins, orientation and print scaling
renameWorksheet

Rename a worksheet
replaceStyle

Replace an existing cell style
saveWorkbook

save Workbook to file
setColWidths

Set worksheet column widths
writeComment

write a cell comment
removeCellMerge

Create a new Workbook object
sheetVisible

Get worksheet visible state.
writeData

Write an object to a worksheet
ungroupColumns

Ungroup Columns
ungroupRows

Ungroup Rows
sheets

Returns names of worksheets.
col2int

Convert Excel column to integer
cloneWorksheet

Clone a worksheet to a workbook
conditionalFormat

Add conditional formatting to cells
conditionalFormatting

Add conditional formatting to cells
getNamedRegions

Get named regions
getSheetNames

Get names of worksheets
if_null_then

If NULL then ...
insertImage

Insert an image into a worksheet
removeColWidths

Remove column widths from a worksheet
setRowHeights

Set worksheet row heights
removeComment

Remove a comment from a cell
sheetVisibility

Get/set worksheet visible state
showGridLines

Set worksheet gridlines to show or hide.
temp_xlsx

helper function to create tempory directory for testing purpose
createNamedRegion

Create / delete a named region.