revised table export
Some checks failed
pkgdown.yaml / pkgdown (push) Has been cancelled

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-12-12 18:09:06 +01:00
commit ed74e0492c
No known key found for this signature in database
7 changed files with 54 additions and 41 deletions

Binary file not shown.

View file

@ -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")