# Example data frame
my_data <- dummy_data(1000)
# Define style
my_style <- excel_output_style(column_widths = c(2, 15, 15, 15, 9))
# Define titles and footnotes. If you want to add hyperlinks you can do so by
# adding "link:" followed by the hyperlink to the main text.
titles <- c("This is title number 1 link: https://cran.r-project.org/",
"This is title number 2",
"This is title number 3")
footnotes <- c("This is footnote number 1",
"This is footnote number 2",
"This is footnote number 3 link: https://cran.r-project.org/")
# Print styled data frame
my_data |> export_with_style(titles = titles,
footnotes = footnotes,
style = my_style)
# Retrieve formatted workbook for further usage
wb <- my_data |>
export_with_style(titles = titles,
footnotes = footnotes,
style = my_style)
Run the code above in your browser using DataLab