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("awalker89/openxlsx")

Bug/feature request

Please let me know which version of openxlsx you are using when posting bug reports.

packageVersion("openxlsx")

Thanks, here.

News

Here.

Authors and Contributors

A list is automagically maintained here.

Copy Link

Version

Install

install.packages('openxlsx')

Monthly Downloads

451,411

Version

4.1.0.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Alexander Walker

Last Published

May 28th, 2019

Functions in openxlsx (4.1.0.1)

createStyle

Create a cell style
addStyle

Add a style to a set of cells
convertFromExcelRef

Convert excel column name to integer index
conditionalFormatting

Add conditional formatting to cells
createComment

create a Comment object
read.xlsx

Read from an Excel file or Workbook object
conditionalFormat

Add conditional formatting to cells
setHeader

Set header for all worksheets
removeColWidths

Remove column widths from a worksheet
saveWorkbook

save Workbook to file
addWorksheet

Add a worksheet to a workbook
all.equal

Check equality of workbooks
mergeCells

Merge cells within a worksheet
createWorkbook

Create a new Workbook object
makeHyperlinkString

create Excel hyperlink string
getStyles

Returns a list of all styles in the workbook
convertToDateTime

Convert from excel time number to R POSIXct type.
readWorkbook

Read from an Excel file or Workbook object
addFilter

Add column filters
loadWorkbook

Load an existing .xlsx file
removeTable

Remove an Excel table in a workbook
dataValidation

Add data validation to cells
openXL

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

Copy a Workbook object.
removeCellMerge

Create a new Workbook object
int2col

Convert integer to Excel column
deleteData

Delete cell data
setColWidths

Set worksheet column widths
replaceStyle

Replace an existing cell style
freezePane

Freeze a worksheet pane
getNamedRegions

Get named regions
pageBreak

add a page break to a worksheet
write.xlsx

write data to an xlsx file
writeComment

write a cell comment
getBaseFont

Return the workbook default font
setFooter

Set footer for all worksheets
createNamedRegion

Create a named region.
removeComment

Remove a comment from a cell
getTables

List Excel tables in a workbook
getSheetNames

Get names of worksheets
pageSetup

Set page margins, orientation and print scaling
setHeaderFooter

Set document headers and footers
openxlsx

xlsx reading, writing and editing.
sheetVisible

Get worksheet visible state.
insertImage

Insert an image into a worksheet
removeFilter

Remove a worksheet filter
modifyBaseFont

Modify the default font
removeRowHeights

Remove custom row heights from a worksheet
setRowHeights

Set worksheet row heights
writeData

Write an object to a worksheet
convertToDate

Convert from excel date number to R Date type
renameWorksheet

Rename a worksheet
insertPlot

Insert the current plot into a worksheet
getCellRefs

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

Get the date origin an xlsx file is using
sheets

Returns names of worksheets.
sheetVisibility

Get/set worksheet visible state
removeWorksheet

Remove a worksheet from a workbook
writeDataTable

Write to a worksheet as an Excel table
showGridLines

Set worksheet gridlines to show or hide.
names

get or set worksheet names
writeFormula

Write a character vector as an Excel Formula
worksheetOrder

Order of worksheets in xlsx file