0

I've been swimming through searches and tutorials and guides and references for days, and I can't seem to find a good way to generate google docs via Java.

I can generate/import .txt files as regular google doc files successfully with java using the drive api, but that's only text files; I need to at least include unordered lists and links in the doc for it to be useful.

My next attempt would be to generate a .rtf or a .doc and then try to import that into google docs, but before I embark on such a project, I wanted to ask you guys first. I also see the realtime api, but it looks like it doesn't specifically deal with docs, just arbitrary data.

What's the recommended way to upload a new google doc with lists and links and stuff?

Thanks!

1
  • Oh great one, i bow before you. Please teach me how to even create a google doc off of a text file since i can't even get that far. Please post any tutorial you found :) Mar 3, 2016 at 3:35

2 Answers 2

1

Probably the simplest import format would be HTML. Just set convert=true and you should be good to go.

0
0

There is no stand-alone API for creating or manipulating the contents of Google Docs files. As you've found, you can create documents in other formats and import them with the Drive API.

If you don't need to work in Java, the other option is to use Google Apps Script, which provides a service for creating and manipulating Google Docs files. More information in this guide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.