Is there a way to edit existing paragraphs in slides using officer (or any other alternative) in R?

白昼怎懂夜的黑 提交于 2021-01-28 22:12:34

问题


I'm entering the task of creating automated reports using R.

I have all the data that I need in a dataframe, and I have a template of the report in pptx format. The PPT has quite some design, so I'm preparing the slides instead of working with a layout pattern to make it easier. Slides have some pre-written paragraphs, and I need to insert data into specific positions of those paragraphs: for example, in one text box it says "in this case, there is a "value1"% of ..." and I would need to replace the "value1" tag with its correct value from my dataframe. I also need to insert graphs.

So, I've been trying out the Office package. I see that it lets me open an existing .pptx file, read it's contents and add new slides or objects into existing slides, but is there a way to edit an existing paragraph and replace a word such as "value1" with the specific value I need?

Thanks a lot!

来源:https://stackoverflow.com/questions/60624415/is-there-a-way-to-edit-existing-paragraphs-in-slides-using-officer-or-any-other

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!