Is it possible to programmatically edit a native Google document, say to make certain words bold or hyperlinks? I know I can export that to some format like DOC or ODT, do the changes and put back. But tried this way manually and saw that I lost the exact look. Could not find any API or object model for native Google docs, although seems there is something for the spreadsheets.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Unfortunately it is not possible to programmatically edit Google Documents (Google's Word Processor document) using a REST API. Only Google Spreadsheet offers such an API at the moment.
You could try Google Apps Script: https://developers.google.com/apps-script/ it is a hosted scripting environment and it offers a Google Documents Service that allows you to edit and manage existing Google Documents.
Lastly you could always upload a document using an open format such as RTF and have it converted to a native Google Documents using the Google Drive API.
标签:
google-drive-sdk