问题
Can anyone tell me how to create doc files using java? I know, there's a POI library, but it seems like it can save only simple documents. You can read anything you wish, but you can't save it all back again. Or may be i missed something? How can i save whole document with pictures, tables and styles?
回答1:
Docmosis lets you do heaps of styling easily via the template. Uses OpenOffice and Java to do the job. Its free and free to distribute.
回答2:
It ain't cheap, but you could try Aspose.Words. It'll do everything you state above and more.
回答3:
JODConverter will allow you to convert lots of different document formats
回答4:
OpenOffice.org's Universal Network Objects (UNO), allow you to generate .doc,.PDF, as well as OpenOffice documents. It supports several programming languages like: Java, C++, Visual Basic, etcc..
Some good things is that: its free, open source and plataform-independent
You can build documents, spreadsheets, presentations, etc. Start from scratch or using a template and fill the gaps..
In order to use it you will need to include some libraries that comes with the OpenOffice suite.
Useful links:
- Open Office home
- Open Office UNO Developer's Guide
来源:https://stackoverflow.com/questions/1222951/how-to-create-doc-file-using-java