Search code examples
google-docs-api

What is the best way to edit google docs using the API?


I'd like to be able to edit any kind of Google docs using the API from Google App Engine. My goal is to lose as little information as possible when editing the document. The edits are fairly simple like replacing some words.

  • Document

To edit them, I'm doing an export in HTML and importing it again. But we are loosing some information like notes. There is also an issue with the title, the size before each title increase at every new update, so I have to reset some css. Is there is a better way of editing docs ?

  • Spreadsheet

There is the spreadsheet API, so I think I'm covered.

  • Presentation

I did not find a format that I could export and import again. The only one seems to be powerpoint. But powerpoint files cannot be easily edited.

  • Drawing

I did not find a format that can be both exported and imported. I tried with SVG, but svg cannot be imported back.


Solution

  • Document

    PDF offers you the best fidelity in and out of Google Docs, without the hassle of proprietary or complicated formats like MS Word files.

    Spreadsheet

    Only proprietary or complicated formats guarantee fidelity here of things like cell color. The Spreadsheets API only allows data to be updated, but not formatting.

    Presentation

    You are correct, PPTX is the only format that can go both in and out of Google Presentations.

    Drawing

    You are correct, there is no import format that can go both in and out of Google Drawings.