cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: Excel Generator
Date Sun, 11 Jan 2004 19:23:10 GMT
Johan Kok wrote:
> I've used chaperon for csv transformations, but are a long way from 
> something usable. - Hopefully chaperon's new version for csv 
> tranformation on cocoon would be usable, and provide a base to work from.
> 
> Geoff: I would be interested in what you have done thus far.

...

I'll review what I did (it's been almost a year) but as I recall I chose 
to use the event model in poi and mapped the row and cell events in my 
case to calls creating a dom (actually I used jdom).  In a generator for 
general use you'd want to map them to sax events.

Off the top of my head, I remember the following which may be of use 
early on if you're not familiar with Poi or excel internals (I knew 
neither when I started).
- The data for empty cells is not reported (and presumably not stored).
- All strings in the document are kept in a common table (not unlike the 
internals of java class files) and pointed to by each event.
- The events do proceed left to right, top to bottom, sheet 1 to sheet 
n, so your proposed A1, A2, A3, ... B1, B2 ... structure should be 
easily mapped from poi event to sax event.
- I did not touch formatting data or formulas but my vague recollection 
was that they complicated things to a degree (formulas to a fairly good 
degree).

I can't remember if I mentioned that the work I did I'm not free to 
share and it was very specific to a given problem anyway.  I did get 
some experience working with the poi event model and I know Cocoon 
generators and I'm of course free to share that experience.  I'll try to 
get a chance to look back over the poi notes and be ready for some more 
specific discussion.

Geoff

> Geoff Howard wrote:
> 
>> Yves Vindevogel wrote:
>>
>>> And through XSP ?
>>> <xsp:logic> Code in Java to open the file with POI and generate
>>> xml?</xsp:logic>
>>>
>>> -----Original Message-----
>>> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
>>> Sent: donderdag 8 januari 2004 21:40
>>> To: users@cocoon.apache.org
>>> Subject: Re: Excel Generator
>>>
>>> On 08.01.2004 18:15, yves.vindevogel@skynet.be wrote:
>>>
>>>> Is it possible to use Excel files as input for a pipeline ?
>>>
>>> No, it isn't. I guess POI itself is able to do it, but it's not
>>> implemented in the Cocoon components.
>>
>> I've done something like this but in context just needed to put out
>> a final document (not sax stream) and so used dom and did not 
>> implement it as a Generator.  I almost went ahead and did a separate 
>> implementation for Cocoon but started feeling like the various ways one
>> might want to interpret a series of excel spreadsheets as xml was too
>> infinitely variable to warrant a quick solution of general use.  
>> Because my parsing requirements were complex, it would not be of 
>> general use even if I were free to release the code (which I'm not).  
>> Still,
>> if you (or someone else) want to tackle it I could help.
>>
>> Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message