Google Doc 更新一個文檔 替換多個變量
gapi.client.request({
method: 'POST',
path: `https://docs.googleapis.com/v1/documents/${docId}:batchUpdate`,
body: {
requests: [
{
replaceAllText: {
replaceText: '蓑笠翁',
containsText: {
text: '${oldMan}',
matchCase:true
}
}
},
{
replaceAllText: {
replaceText: '雪',
containsText: {
text: '${snow}',
matchCase:true
}
}
}
]
}
}).then(res => {
printLog(`更新文檔成功`, 'text-success')
console.log(res)
downLoadDocFile(res.result.documentId)
})
版權聲明:本文內容由網絡用戶投稿,版權歸原作者所有,本站不擁有其著作權,亦不承擔相應法律責任。如果您發現本站中有涉嫌抄襲或描述失實的內容,請聯系我們jiasou666@gmail.com 處理,核實后本網站將在24小時內刪除侵權內容。