首页 > 解决方案 > R 的官员包无法识别主布局中的 Powerpoint 占位符

问题描述

PowerPoint 主布局中的占位符并没有被 R 中的官员包一致识别。在下面的示例中,我附上了一组 2 张幻灯片,每张都使用不同的主布局和布局。在“标题”布局中,当应用 layout_properties() 时,占位符很容易显示,但是当我将 layout_properties() 应用于“标题和内容”时,输出为 0 行。这是一个问题,因为在 Powerpoint 中我可以清楚地看到此布局中有 3 个不同的占位符。

library(officer)
library(tidyverse)
library(magrittr)

file_deck <- "stack_demo.pptx"

deck <- read_pptx(file_deck)

layout_summary(deck)

layout_properties(deck, layout = "title", master = "intro") # outputs correctly
layout_properties(deck, layout = "title + content", master = "body") # incorrectly outputs "0 rows"

标签: rpowerpointofficer

解决方案


推荐阅读