1. Download the #1 Android News App:   EarlyBird - News for Android
    Dismiss Notice

App create microsoft word documents?

Last Updated:

  1. jdg690

    jdg690 Member

    My current app I'm developing needs to create word documents (.doc) to display full on reports for my users. Is this possible?

    The idea is after the user fills in a few text views, the app gathers that data and inputs it in a new word doc, kind of like a generator to generate essays/legal documents.


  2. jonbonazza

    jonbonazza Well-Known Member

    You will need to find the structure of the .doc format. If I remember correctly, the ,doc format is a binary format, so it's not as simple as just opening it in a text editor. You should be able to find the structure on the web somewhere though. You could also use the newer .docx format which is just an XML file, so it can be read using any text editor, so you can easily figure out the structure yourself if you really wish.

    Lastly, there are likely preexisting java libraries out there that will do this for you, so I would look for one of those before diving into file structures.
  3. jdg690

    jdg690 Member

    HA! Got it! All it took was a simple "Save-As" and Word XML was one of the options.

    Thanks, now I just have to go through the mess that Microsoft has on these files.
  4. jdg690

    jdg690 Member

    John, if you ever figure out how to use any of the libraries or know a better way of doing this let us know. I was trying to get java2doc to work with no luck so I'm just going to create the .doc the hard way with xml.
  5. jdg690

    jdg690 Member

    Just thought I'd shoot an update on this. I couldn't figure out a way to create .doc in java. I tried writing to a new .doc file with java, I also tried using the built in XMLParser and also tried with strings and it just wasn't working.

    The solution I'm going for? ASP .NET to create the file and Android web view to connect to webpage. The only problem I'm facing is being able to get the web view to accept the .doc download. Anyone experience with accepting downloads on web views?

    If not I'll just have ASP .NET create the file and e-mail it. Instead of creating too much overhead for my app, ASP .NET servers will pick up the heavy lifting.

Share This Page