How can developers edit a Google Doc programmatically? Is there a Docs API?

前端 未结 6 1215
不思量自难忘°
不思量自难忘° 2020-12-13 21:25

There doesn\'t seem to be (to my knowledge) an API to edit Google Docs (not spreadsheets, their HTML based documents). Has anyone done something like the? Maybe by downloadi

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 21:58

    There is com.google.api.services.drive.model.File.getExportLinks

    You can get a Google Doc as a docx (for example), edit it using your favourite docx editor, then upload again. See the samples for doing this (starting with GoogleDriveDownloadAsDocx) in the context of docx4j. Note the README.

    Or do the same with any of the other export formats.

提交回复
热议问题