I want to print an Excel
file to a pdf
file after manipulating it. For the manipulation I used the .xlsx
package which works fine. There is a function printSetup
but I cannot find a function to start the printing. Is there a solution for this?
library(xlsx)
file <- "test.xlsx"
wb <- loadWorkbook(file)
sheets <- getSheets(wb) # get all sheets
sheet <- sheets[[1]] # get first sheet
# HERE: MAGIC TO SAVE THIS SHEET TO PDF
It may be a solution using DCOM through the RDCOMClient
package, though I would prefer a plattform independent solution (e.g. using xlsx
) as I work on MacOS. Any ideas?