I have a very complex Java application which renders spreadsheet tables and summary documents in a window. These outputs are non standard in the sense that for instance the spreadsheet table isn't really a spreadsheet indeed not every row is an instance of an entity and every column an attribute. Some rows might for instance be titles to sub tables.

Now the user wants to print these screens so we generally offer to export these screens to word processor or spreadsheet documents so that he can customize font, number of columns, width of columns etc etc.

The problem with that is that the management is not happy with this solution because although flexible it forces the user to customize the document for every single print and has to restart from the beginning each time. We had therefore to put some editing features in our program and if the user wants something more (for instance backgroudn color of a row) he can always export what he has so far and add the wanted extra features to the document using his word processor or spreadsheet processor.

Thsi solution works but doesn't please me because the more time passes, the more our very complex program has to deal with editing like features at a point where in a future it will be as complex as a standard word or excel processor.

Isn't there any solution to keep our program separate from editing features but somehow to let the choices be remembered when the user wants to export the data and not let him redo all again? This solution should be portable enough to work with OpenOffice, Libre Office and Microsoft Word at least...

Thank you

  • I think this is rather a product management issue rather than a programmatic one – superM Mar 12 '13 at 13:12
  • Hmm not really, one could for instance point me to some protocol to specify how to visualize a spreadsheet starting from some saved preferences of the user. Or tell me how they managed to use a third party editing tool which works under Java and takes care of it all. I don't see it very product management related.. – dendini Mar 12 '13 at 13:14
  • Have you thought about building an integration plugin for Word (or OpenOffice or LibreOffice) that makes it easier to move data between your application and the word processor and can the user's options? Word and OpenOffice/LibreOffice have plugin frameworks and APIs... – FrustratedWithFormsDesigner Mar 12 '13 at 14:18
  • Preparing three separate plugins would be even worse than programming it straight in our application. I hoped to hear some canned solutions because to me this problem seems general enought to have been already solved thousands of times. – dendini Mar 12 '13 at 14:33
  • @dendini: There might be existing libraries/APIs you can download/purchase to make the process of writing a plugin much easier, but I don't know of an easier, canned solution. You could also go with creating templates for Word/Excel (I don't know much about advanced templates in OpenOffice/LibreOffice), and letting users save customized versions of templates, if you don't want to go the route of full-blown plugins. – FrustratedWithFormsDesigner Mar 12 '13 at 14:42

We have exactly this issue.

Our solution was to engage with the customer, discuss the options, they want HUGE flexibility, but little work.

Build reports. We use Microsoft SQL Reporting Server (which the Express edition is free for commercial use but limited, need standard licence for busy/production sites)

From 'the screen' you want to print from, you 'open' the report by passing I the correct parameters.

For example, if you were on an 'order' screen, you would pass the 'order id'.

From SSRS, you can view/print etc. and export to Word/Excel/PDF.

The reports are simple to create if you know SQL. Otherwise a bit difficult. So provide the 'base' report/template, then they can change/add to it with ease, a bit like a really old edition of word!



  • There is a learning curve to using SSRS Report Builder. Lots of videos on you tube.
  • You have to maintain/setup a 'server' to run reports on, it is possible to run reports locally only, but you're in JAVA so I won't go there.
  • not a simple to edit as a word document
  • when building a report, you need to connect to THE database directly, or have a local copy of it.
  • This is an interesting solution although my application has to work standalone and I cannot require to install a server for this. I might however search for Java reporting tool.. – dendini Mar 12 '13 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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