R/exportFct_trySave.R

Defines functions exportFct_trySave

exportFct_trySave <- function(wb, file){
  tryCatch({
    saveWorkbook(wb, file=file, overwrite=TRUE)
    message("File created successfully!\n")
  },
  error = function(err){
    message("\nCaution! Excel spreasheet could not be produced correctly due to the following error:")
    message(err)
    message(paste("\n\nAlthough the Excel output failed, you can still access the results of the analysis via its return value or as an R object in the results folder.\n"))
  })
  return(TRUE)
}

Try the TPP package in your browser

Any scripts or data that you put into this service are public.

TPP documentation built on Nov. 8, 2020, 5:55 p.m.