Learn R Programming

openxlsx2 (version 0.7)

fmt_txt: format strings independent of the cell style.

Description

format strings independent of the cell style.

Usage

fmt_txt(
  x,
  bold = FALSE,
  italic = FALSE,
  underline = FALSE,
  strike = FALSE,
  size = NULL,
  color = NULL,
  font = NULL,
  charset = NULL,
  outline = NULL,
  vertAlign = NULL
)

Arguments

x

a string or part of a string

bold

bold

italic

italic

underline

underline

strike

strike

size

the font size

color

a wbColor color for the font

font

the font name

charset

integer value from the table below

outline

TRUE or FALSE

vertAlign

baseline, superscript, or subscript

Details

The result is an xml string. It is possible to paste multiple fmt_txt() strings together to create a string with differing styles.

"Value""Character Set"
"0""ANSI_CHARSET"
"1""DEFAULT_CHARSET"
"2""SYMBOL_CHARSET"
"77""MAC_CHARSET"
"128""SHIFTJIS_CHARSET"
"129""HANGUL_CHARSET"
"130""JOHAB_CHARSET"
"134""GB2312_CHARSET"
"136""CHINESEBIG5_CHARSET"
"161""GREEK_CHARSET"
"162""TURKISH_CHARSET"
"163""VIETNAMESE_CHARSET"
"177""HEBREW_CHARSET"
"178""ARABIC_CHARSET"
"186""BALTIC_CHARSET"
"204""RUSSIAN_CHARSET"
"222""THAI_CHARSET"
"238""EASTEUROPE_CHARSET"
"255""OEM_CHARSET"

Examples

Run this code
fmt_txt("bar", underline = TRUE)

Run the code above in your browser using DataLab