xl_rich_string("This is ", xl_rich_run("bold", xl_font(bold = TRUE)), " text")
# in a cell, with a cell-wide format alongside the per-run fonts
xl_cell_general(
value = xl_rich_string("2 H", xl_rich_run("2", xl_font(script = "sub")), "O"),
format = xl_align(horizontal = "center")
)
Run the code above in your browser using DataLab