poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Iouri Michtchenko" <Iouri.Michtche...@cern.ch>
Subject RE: Excel-Sheets as Templates
Date Thu, 21 Aug 2003 15:24:29 GMT
Hi,
why don't you like cocoon? I agree gnumerc format is a bit complicated. 
But you can write your own serializer. I did that. 
Now I have my own simple XML schema describing excel file. And my serializer can
open predefined excel file (template) and add cells to it (instead of creating a new file).
So all I need to render my pages is to create an initial XML document representing page data
then
I apply XSLT to get result XML and finally I call serializer. And you are not obliged to use
Cocoon!
One can find easily a tool that transforms any java object (page data model) to XML. And it
is not difficult to apply XSLT.
So that you can implement your own XML "pipeline".
Then you will need to define only configurations files (for initial XML, XSLT, excel template)...

Regards,
Iouri.

-----Original Message-----
From: "Mehner, Björn" [mailto:Bjoern.Mehner@epos-cs.de] 
Sent: Thursday, August 21, 2003 16:52
To: POI Users List (E-Mail)
Subject: Excel-Sheets as Templates


Hi, everyone,

after playing a while with HSSF I wonder if there is already a solution for my problem. I
want to use POI/HSSF in some sort of template engine for printing data in a webapplication.
Printing in Browsers always sucks so we use Excel for printing nice layouts (actually this
was not really my idea but I have to do it ;-) ).

My goal is to read in Excel templates on request, fill the data from Java objects in certain
cells and deliver the sheet to the clients browser. Up to now I created a class for every
different layout I wanted to print. This involves nearly one class for every page in our webapplication
and there are many of them. This is not easy to maintain because changing the layout requires
recompiling. It would be better if changing the layout would be easier. The value objects
are not supposed to change often. So they are not a problem. But I have to store both the
template and the description how to fill it outside the program. My idea now was to store
an excel template and a XML file with a description how to fill the excel file with data from
a certain java class. But this sounds like something somebody else might already have implemented.

Is there any template engine with (preferred) or without poi that works in a similar way?


I looked at cocoon, but cocoon just moves the problem a bit further on. It uses the gnumeric
format, and so I have to use a description how to fill this format with my data and I would
prefer to use Excel as template format. Although it is horrible every troll can create an
Excel template with MS Office.

Any suggestions?

Thanks in advance!

ciao Bodo

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message