setHeader: Set header for all worksheets

View source: R/wrappers.R

setHeaderR Documentation

Set header for all worksheets

Description

DEPRECATED

Usage

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

Arguments

wb

A workbook object

text

header text. A character vector of length 1.

position

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

Author(s)

Alexander Walker

Examples

## Not run: 
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, "headerHeaderExample.xlsx", overwrite = TRUE)

## End(Not run)

openxlsx documentation built on Sept. 20, 2024, 5:08 p.m.