officer is an R package for manipulating Word (.docx) and PowerPoint (*.pptx) documents.
Questions tagged [officer]
413 questions
0
votes
1 answer
Does officer package support old format of PPT files (Window 97-2003)
R Officer package is not able to read old PPT files of type Windows Presentation 97-2003. It gives below error.
simpleError in zip::unzip(zipfile = newfile, exdir = folder): zip error: Cannot open zip…

aschinch
- 3
- 1
0
votes
1 answer
mschart: How do I pass mschart a dynamic list of column names and colors
In the code below, I generate some random data. I want to pass it to a function to plot but want to be able to control the looks through parameters. For e.g. I want to control the line colors, but mschart outputs red and blue lines. This is not what…

Pritish Kakodkar
- 307
- 1
- 4
- 12
0
votes
1 answer
Formatted arrow inside Word document paragraph
Would like to add arrows to a Word document paragraph using officer. Used to just be able to paste those into a paragraph using body_add_par. Spell check wasn't working in the resulting document. Managed to get spell-check working. Not quite sure…

Paul
- 383
- 4
- 14
0
votes
0 answers
How to open a Word document, choose 'yes' in a pop-up window and save it via code?
I am generating reports in Word using R officer package. I want my reports to contain table of contents, list of figures and list of tables, but when I add them, there is a warning "This document contains fields that may refer to other files. Do you…
0
votes
1 answer
Adding 'List' Objects to Word document using the Officer package
First time posting here.
I'm trying to get some statistical results to output onto a Word doc using the Officer package. I understand that the body_add_* functions seem to only work on data frames. However, functions and tests like gvlma and ncvTest…

raidorz
- 1
- 1
0
votes
0 answers
Add Equations or Math Mode in a PowerPoint Slide Using R officer Package
I am using officer to create PowerPoint presentations. I have been able to add figures, tables, and images to slides. Now I would like to add equations.
In the past, I have used LaTeX via Sweave to do this. However, this is a corporate presentation…

user49017
- 137
- 1
- 6
0
votes
0 answers
When adding a footer to a flextable and exporting to pptx using 'officer' corrupts the pptx
When exporting a flextable to *.pptx using 'officer' if the flextable has a footer it seems to corrupt the power point and it needs to be repaired.
I've tried using the other footer functions. I also tried adding a header to see if that similar…

Lionel Duarte
- 121
- 6
0
votes
1 answer
How to write multiple docx files in purrr::map() style with officer from within downloadHandler() in Shiny to temp directory?
I am trying to write multiple docx files from within downloadHandler(). When purrr::map() arrives at the part of the mapped function where the resume is written with a unique name to the specified temp directory, that is then zipped and returned to…

Travis Knoche
- 28
- 5
0
votes
0 answers
Extract text from content control cell in Word
I need to extract text from Word documents that contain parts formatted as Rich Text Content Control (RTCC). I am using officer. The problem is that I am not able to extract text formatted as RTCC. Any ideas on how to do…

Bruno Guarita
- 767
- 10
- 21
0
votes
2 answers
Soft Returns in Officer
How can one do "soft" returns for docx files from officer? To do it manually, I'd press SHIFT + ENTER and alter the ruler tabs to offset subsequent lines. But the heading will show as one line in the table of contents.
I have not been able to…

candronikos
- 159
- 1
- 13
0
votes
1 answer
Color a word from imported text file, and save as formatted word document
I'm trying to color a set of words, for example word1 and word2 from an imported word document using the officer package in R. I am now stuck after setting the text properties for the word.
I've read the data file using read_docx(filename), where…

Winson Yang
- 1
- 2
0
votes
1 answer
Alignment in flextable correct in Rstudio viewer, incorrect in Word
I am trying to left align some columns in a few of my tables. Most of the time this works no problem, but other times, the columns selected with:
ft <-align(ft, j=1:2, align = "left", part = "body")
ft <-align(ft, j=4:6, align = "left", part =…
0
votes
1 answer
Is it possible to specify a Word template file in officer as was the case for ReportRs?
Using the older ReporteRs package, it looks like it was possible to specify a Word template with code like:
doc <- docx(template = "your template.docx")
Is it possible to specify a Word template using the newer officer package? It may be in the…

Paul
- 383
- 4
- 14
0
votes
1 answer
Color coding imported docx document
I'm trying to highlight a set of words, for example word1 and word2 from an imported word document using the officer package in R. I am now stuck after setting the text properties for the word. How do I get officer to highlight the words in the…

Winson Yang
- 1
- 2
0
votes
1 answer
How to use index argument in ph_with_text function from officer package
Ciao,
I'm working on a custom pptx presentation using officer package on R.
The truth is that I am porting the code form Reporters.
My question is about the structure of a layout. The starting point is an empty pptx I upload in order to import…

clarkmaio
- 359
- 2
- 12