mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
This commit is contained in:
parent
d9614eb37f
commit
ed74e0492c
7 changed files with 54 additions and 41 deletions
|
|
@ -11,7 +11,7 @@ table_download_ui <- function(id, title = "Table", ...) {
|
|||
selected = NULL,
|
||||
choices = list(
|
||||
"MS Word" = "docx",
|
||||
"Open document format" = "rtf"
|
||||
"Compatible (rtf)" = "rtf"
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
|
|
@ -66,11 +66,14 @@ table_download_server <- function(id, data, file_name = "table", ...) {
|
|||
data = table,
|
||||
filename = file # Save to the file path provided by downloadHandler
|
||||
)
|
||||
if (type == "docx") {
|
||||
out |> doconv::docx_update()
|
||||
} else {
|
||||
out
|
||||
}
|
||||
# This only works locally and was disabled
|
||||
# if (type == "docx") {
|
||||
# out |> doconv::docx_update()
|
||||
# } else {
|
||||
# out
|
||||
# }
|
||||
|
||||
out
|
||||
},
|
||||
error = function(err) {
|
||||
shiny::showNotification(paste0(i18n$t("Error: "), err), type = "error")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue