Reputation: 63
I have a R markdown where I built a table and I want to add the option to download the table to a excel file.
kable(MyTable) %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed",
"responsive")) %>%
scroll_box(width = "900px", height = "500px")
Upvotes: 6
Views: 7235
Reputation: 159
You could always try using DT::datatable
to get export buttons
MyTable %>%
DT::datatable(
extensions = 'Buttons',
options = list(dom = 'Bfrtip',
buttons = c('excel', "csv")))
Upvotes: 10