I have tried something along these lines. Amending from some code provided by a colleague am I over complicating things ? I literally just want to paste test.xlsx which kind of looks like this onto a power point slide in a table
month A B
01/01/24 1 2
01/02/24 5 2
library(readxl)
input <- read_excel(“C:/Desktop/test.xlsx”)
Add a slide
doc <- add_slide(doc, layout = “1 column, large table”, master = “master”)
Add the slide contents
#doc <- ph_with(doc, slide_title, location = ph_location_label(ph_label = “Title 1”))
doc <- ph_with(doc, input, location = ph_location_label(ph_label = “Content Placeholder 2”))
Save the output PowerPoint file
print(doc, target = file.path(Sys.getenv(“file_path”),paste0(“test.pptx”)) )
input