Learn R Programming

openxlsx (version 4.2.7.1)

setFooter: Set footer for all worksheets

Description

DEPRECATED

Usage

setFooter(wb, text, position = "center")

Arguments

wb

A workbook object

text

footer text. A character vector of length 1.

position

Position of text in footer. One of "left", "center" or "right"

Author

Alexander Walker

Examples

Run this code
if (FALSE) {
wb <- createWorkbook("Edgar Anderson")
addWorksheet(wb, "S1")
writeDataTable(wb, "S1", x = iris[1:30, ], xy = c("C", 5))

## set all headers
setHeader(wb, "This is a header", position = "center")
setHeader(wb, "To the left", position = "left")
setHeader(wb, "On the right", position = "right")

## set all footers
setFooter(wb, "Center Footer Here", position = "center")
setFooter(wb, "Bottom left", position = "left")
setFooter(wb, Sys.Date(), position = "right")

saveWorkbook(wb, "headerFooterExample.xlsx", overwrite = TRUE)
}

Run the code above in your browser using DataLab