# Use `gtcars` to create a gt table;
# add a header and then export as
# OOXML code for Word
tab_rtf <-
  gtcars %>%
  dplyr::select(mfr, model) %>%
  dplyr::slice(1:2) %>%
  gt() %>%
  tab_header(
    title = md("Data listing from **gtcars**"),
    subtitle = md("`gtcars` is an R dataset")
  ) %>%
  as_word()
Run the code above in your browser using DataLab