我有一个R标记,用于构建表格,我想添加将表格下载到Excel文件的选项。
kable(MyTable) %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed",
"responsive")) %>%
scroll_box(width = "900px", height = "500px")
答案 0 :(得分:2)
您始终可以尝试使用DT::datatable
来获取导出按钮
MyTable %>%
DT::datatable(
extensions = 'Buttons',
options = list(dom = 'Bfrtip',
buttons = c('excel', "csv")))