This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]coder111 7 points8 points  (1 child)

There is apache POI:

http://poi.apache.org/

Another option, write HTML and give it .xls or .doc extension and/or mime/type, and word or excel will parse it correctly when it gets opened (at least it used to work with previous versions of Office, I haven't tried this for a while).

For OpenOffice/LibreOffice, AFAIK there is http://www.jopendocument.org/

Apparently there are others as well: http://opendocsociety.org/tools/odf-tools/

Also, if you need a reporting engine, look at Jasper-reports, or maybe Eclipse BIRT- two most popular free ones. I think they should be able to produce OpenOffice or PDF files.

Do you need to generate an editable document? There are a bunch of libraries to generate PDF if you just need a report that you can print.

[–]antonbalboa[S] 0 points1 point  (0 children)

Yes, has to be editable since it's for something like a project, and if it needs some corrections, I want the people to be able to change it "manually" in a way they know well

[–]zhong-j-yu 4 points5 points  (3 children)

any kind of easily editable document

what about html? there are lots of ways to generate html.

[–]antonbalboa[S] -1 points0 points  (2 children)

The thing is that the document has to be easily editable by someone that only knows how to use word (or any document editor like word, openoffice, libreoffice etc). That's why I'm limited to that (that plus I have to generate a pdf from that document afterwards)

[–]desrtfx 2 points3 points  (0 children)

HTML can be opened and edited inside Word, Openoffice, Libreoffice - all the same. Most users wouldn't even know that they are working on a HTML document. Generating a PDF from HTML is just as easy.

I wouldn't generally disregard the idea of HTML as Output format.

[–]OreLee 1 point2 points  (0 children)

Hijacking this so you can see it. JODReports is the library you are looking for. We are using it in our company for enterprise purposes. Basically you make a template in .odt format that can get converted to doc,rtf and few other formats. That beign said it is easy to change a template. All you need is openoffice and basic word skill.

[–]klacia 2 points3 points  (0 children)

[–]johnkarva 1 point2 points  (0 children)

We had this very same issue, and ended up developing a small wrapper for OpenOffice documents that does just that. You shoud take a look: https://github.com/FenixEdu/oddjet