Learn R Programming

officer (version 0.7.0)

open_file: Opens a file locally

Description

Opening a file locally requires a compatible application to be installed (e.g., MS Office or LibreOffice for .pptx or .docx files).

Usage

open_file(path)

Arguments

path

File path.

Details

NB: Function is a small wrapper around utils::browseURL() to have a more suitable function name.

Examples

Run this code
x <- read_pptx()
x <- add_slide(x, "Title Slide", ctrTitle = "My Title")
file <- print(x, tempfile(fileext = ".pptx"))
if (FALSE) {
open_file(file)}

Run the code above in your browser using DataLab