【发布时间】:2017-02-19 02:48:10
【问题描述】:
我正在处理包含数百个空段落的 Google 文档。我想自动删除这些空行。
在 LibreOffice Writer 中,您可以使用查找和替换工具将 ^$ 替换为空,但这在 Google Docs 中不起作用。
My search for ^$ or ^\s*$ returned 0 results even though there should be 3 matches
如何使用 Google Apps 脚本删除空白段落?
我已经尝试过body.findText("^$");,但返回的是null
function removeBlankParagraphs(doc) {
var body = doc.getBody();
result = body.findText("^$");
}
【问题讨论】:
标签: google-apps-script google-docs