如何从官员删除docx开头的空白行

问题描述 投票:0回答:1

我正在使用qazxsw poi为qazxsw poi创建一个Word(docx)文档。这是代码:

officer

它创建一个docx文档,在句子顶部有一个空行。它不是在字体样式中设置的字体样式之前的间距。我没有注释R但空白线仍然存在。我怎么能摆脱这个?

任何帮助表示赞赏!

r officer
1个回答
1
投票

要删除段落,您需要使用函数library(officer) library(magrittr) my_docx = read_docx() %>% # cursor_begin() %<>% body_add_par("Hello here is a test sentence to see if there is a blank line above it.", style = "Normal") %>% print(target = "test.docx") 。请参阅此处的文档:cursor_begin()

body_remove()
© www.soinside.com 2019 - 2024. All rights reserved.