R/as_link.R

Defines functions office_web_viewer

Documented in office_web_viewer

#' @importFrom htmltools tags
#' @export
#' @title Office Web Viewer
#' @description Produce an iframe linked to Office Web Viewer. It let's you
#' display a Microsoft Office document in a Web browser.
#' @param url file url
office_web_viewer <- function(url){
  tags$p(  tags$span("Download file "),
                      tags$a(basename(url), href = url),
                      tags$span(" - view with"),
                      tags$a("office web viewer", target="_blank",
                                        href = paste0("https://view.officeapps.live.com/op/view.aspx?src=", url)
                      ),
                      style="text-align:center;font-style:italic;color:gray;"
  )
}

Try the ReporteRs package in your browser

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

ReporteRs documentation built on April 1, 2018, 12:06 p.m.