Alignment: Create an Alignment object.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Alignment.R

Description

Create an Alignment object, useful when working with cell styles.

Usage

1
2
3
4
5
6
7
8
9
is.Alignment(x)

Alignment(
  horizontal = NULL,
  vertical = NULL,
  wrapText = FALSE,
  rotation = 0,
  indent = 0
)

Arguments

x

An Alignment object, as returned by Alignment.

horizontal

a character value specifying the horizontal alignment. Valid values come from constant HALIGN_STYLES_.

vertical

a character value specifying the vertical alignment. Valid values come from constant VALIGN_STYLES_.

wrapText

a logical indicating if the text should be wrapped.

rotation

a numerical value indicating the degrees you want to rotate the text in the cell.

indent

a numerical value indicating the number of spaces you want to indent the text in the cell.

Value

Alignment returns a list with components from the input argument, and a class attribute "Alignment". Alignment objects are used when constructing cell styles.

is.Alignment returns TRUE if the argument is of class "Alignment" and FALSE otherwise.

Author(s)

Adrian Dragulescu

See Also

CellStyle for using the a Alignment object.

Examples

1
2
  # you can just use h for horizontal, since R does the matching for you
  a1 <-  Alignment(h="ALIGN_CENTER", rotation=90) # centered and rotated!

xlsx documentation built on Nov. 10, 2020, 3:52 p.m.