Skip to content

Commit

Permalink
Merge pull request #157 from ljwoodley/switch_to_openxlsx
Browse files Browse the repository at this point in the history
switch to openxlsx
  • Loading branch information
pbchase committed Apr 23, 2024
2 parents 5a79446 + 91c6b4d commit 68f8337
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/ctsit/rstudio-ci:4.2.1
image: ghcr.io/ctsit/rstudio-ci:4.3.3

env:
CI: "TRUE"
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Imports:
tidyr,
vctrs,
jsonlite,
writexl
openxlsx
Suggests:
RSQLite,
digest,
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN R -e "install.packages(c( \
'rjson', \
'sendmailR', \
'sqldf', \
'writexl', \
'openxlsx', \
'kableExtra' \
))"

Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ export(write_info_log_entry)
export(write_summary_metrics)
export(write_to_sql_db)
importFrom(magrittr,"%>%")
importFrom(openxlsx,write.xlsx)
importFrom(rlang,.data)
importFrom(sendmailR,"sendmail")
importFrom(writexl,write_xlsx)
4 changes: 2 additions & 2 deletions R/logging.R
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ write_info_log_entry <- function(conn, target_db_name, table_written = NULL, df,
#'
#' }
#' @importFrom sendmailR "sendmail"
#' @importFrom writexl write_xlsx
#' @importFrom openxlsx write.xlsx
#' @export
send_email <-
function(email_body,
Expand Down Expand Up @@ -711,7 +711,7 @@ send_email <-
if (file_extension == "csv") {
readr::write_csv(df_to_email[[i]], file_fullpath, ...)
} else if (file_extension == "xlsx") {
writexl::write_xlsx(df_to_email[[i]], file_fullpath, ...)
openxlsx::write.xlsx(df_to_email[[i]], file_fullpath, ...)
} else {
stop("Unsupported file format. Use 'csv' or 'xlsx'.")
}
Expand Down

0 comments on commit 68f8337

Please sign in to comment.