Learn R Programming

xlsx (version 0.1.1)

Font: Create a Font object.

Description

Create a Font object.

Usage

createFont(wb, color=NULL, fontHeightInPoints=NULL, fontName=NULL,
  isItalic=FALSE, isStrikeout=FALSE, isBold=FALSE, underline=NULL,
  boldweight=NULL)

Arguments

wb
a workbook object as returned by createWorkbook or loadWorkbook.
color
a character specifiying the font color. Any color names as returned by colors can be used.
fontHeightInPoints
a numeric value specifying the font height.
fontName
a character value for the font to use. All values that you see in Excel should be available, e.g. "Courier New".
isItalic
a logical indicating the font should be italic.
isStrikeout
a logical indicating the font should be stiked out.
isBold
a logical indicating the font should be bold.
underline
a logical indicating the font should be underlined.
boldweight
a numeric value indicating bold weight. Normal is 400, regular bold is 700.

Value

  • createFont returns a java reference to a Font object.

Details

Default values for NULL parameters are taken from Excel. So the default font color is black, the default font name is "Calibri", and the font height in points is 11.

NOTE: You need to have a Workbook object to attach a Font object to it.

See Also

CellStyle for using the a Font object.