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

Thanks, here.

News

Here.

Authors and Contributors

A list is automagically maintained here.

Copy Link

Version

Install

install.packages('openxlsx')

Monthly Downloads

376,325

Version

4.1.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Philipp Schauberger

Last Published

November 7th, 2019

Functions in openxlsx (4.1.3)

getBaseFont

Return the workbook default font
int2col

Convert integer to Excel column
insertPlot

Insert the current plot into a worksheet
getDateOrigin

Get the date origin an xlsx file is using
getNamedRegions

Get named regions
getCellRefs

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

Create a named region.
makeHyperlinkString

create Excel hyperlink string
loadWorkbook

Load an existing .xlsx file
createStyle

Create a cell style
removeFilter

Remove a worksheet filter
deleteData

Delete cell data
removeRowHeights

Remove custom row heights from a worksheet
createComment

create a Comment object
openxlsx

xlsx reading, writing and editing.
copyWorkbook

Copy a Workbook object.
all.equal

Check equality of workbooks
pageBreak

add a page break to a worksheet
openXL

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

Rename a worksheet
getStyles

Returns a list of all styles in the workbook
protectWorksheet

Protect a worksheet from modifications
read.xlsx

Read from an Excel file or Workbook object
freezePane

Freeze a worksheet pane
removeTable

Remove an Excel table in a workbook
getSheetNames

Get names of worksheets
names

get or set worksheet names
replaceStyle

Replace an existing cell style
showGridLines

Set worksheet gridlines to show or hide.
sheets

Returns names of worksheets.
removeCellMerge

Create a new Workbook object
writeFormula

Write a character vector as an Excel Formula
removeWorksheet

Remove a worksheet from a workbook
readWorkbook

Read from an Excel file or Workbook object
writeDataTable

Write to a worksheet as an Excel table
setRowHeights

Set worksheet row heights
setHeaderFooter

Set document headers and footers
worksheetOrder

Order of worksheets in xlsx file
write.xlsx

write data to an xlsx file
sheetVisibility

Get/set worksheet visible state
sheetVisible

Get worksheet visible state.
getTables

List Excel tables in a workbook
insertImage

Insert an image into a worksheet
protectWorkbook

Protect a workbook from modifications
createWorkbook

Create a new Workbook object
dataValidation

Add data validation to cells
pageSetup

Set page margins, orientation and print scaling
saveWorkbook

save Workbook to file
setColWidths

Set worksheet column widths
mergeCells

Merge cells within a worksheet
removeColWidths

Remove column widths from a worksheet
removeComment

Remove a comment from a cell
setFooter

Set footer for all worksheets
setHeader

Set header for all worksheets
modifyBaseFont

Modify the default font
writeData

Write an object to a worksheet
writeComment

write a cell comment
addWorksheet

Add a worksheet to a workbook
conditionalFormatting

Add conditional formatting to cells
convertToDateTime

Convert from excel time number to R POSIXct type.
convertToDate

Convert from excel date number to R Date type
addFilter

Add column filters
addStyle

Add a style to a set of cells
cloneWorksheet

Clone a worksheet to a workbook
convertFromExcelRef

Convert excel column name to integer index
conditionalFormat

Add conditional formatting to cells