是否可以将可编辑的HTML表打印到Odedown PowerPoint中?

发布于 2025-01-23 20:42:50 字数 1024 浏览 3 评论 0原文

我正在尝试使用R中的官员自动化PowerPoint演示文稿甲板。我主要是使用GT()包装来制作一些桌子(因为我喜欢它的多功能性),但是问题是,官员要求我保存GT( )在我可以将其粘贴到PowerPoint之前的.png。这一切都很好,但是我希望能够修改所述桌子。

GT()软件包的一件很棒的事情是,我可以将表作为RAW HTML格式保存。但是,我不知道如何在以下代码中打印上述html东西的内容。

my_pres <- pres %>%
 remove_slide(index = 1) %>% 
 add_slide(layout = "Title Slide", master = "Useless") %>%
 ph_with(value = "Gaetano was here" , location = ph_location_label(ph_label = "Title and Company Name")) %>%
 add_slide(layout = "Definitions", master = "Useless") %>%
 #ph_with(value = "Methodology & Definitions", location = ph_location_label(ph_label = "Methodology")) %>%
 ph_with(value = Definitions, location = ph_location_label(ph_label = "Definitions"),
         level_list = c(1L, 2L, 2L, 2L, 3L, 4L, 5L, 2L)) %>%
 add_slide(layout = "Graphs", master = "Useless") %>%
 ph_with(value = extimg3 , location = ph_location_label(ph_label = "Graphs"))  # extimg3 is where I want my table to appear. 

我不相信Markdown与军官一起工作,因此我不在Markdown工作。

I am trying to automate a PowerPoint presentation deck using officer in R. I am mostly working with the gt() package to make some tables (as I like the versatility of it) but the issue is that officedown requires me to save the gt() stuff as .png before I can paste it into powerpoint. This is all good and well but I would like to be able to modify the said table.

One of the great things about the gt() package is that I can save the table as a raw html format. However, I have no idea how to print the said html thing in the following code for my presentation.

my_pres <- pres %>%
 remove_slide(index = 1) %>% 
 add_slide(layout = "Title Slide", master = "Useless") %>%
 ph_with(value = "Gaetano was here" , location = ph_location_label(ph_label = "Title and Company Name")) %>%
 add_slide(layout = "Definitions", master = "Useless") %>%
 #ph_with(value = "Methodology & Definitions", location = ph_location_label(ph_label = "Methodology")) %>%
 ph_with(value = Definitions, location = ph_location_label(ph_label = "Definitions"),
         level_list = c(1L, 2L, 2L, 2L, 3L, 4L, 5L, 2L)) %>%
 add_slide(layout = "Graphs", master = "Useless") %>%
 ph_with(value = extimg3 , location = ph_location_label(ph_label = "Graphs"))  # extimg3 is where I want my table to appear. 

I am not working in markdown as I do not believe that markdown works with officer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文