> but no, in particular, whats changed is the way in which records are
stored/referenced. So look at the low level model classes, that build up the
excel object model.. thats where the guts of it are. Then there are smaller
changes in how the usermodel classes access the low level model. Most of the
"business logic" , ie, interactions of records etc, are relatively
unchanged.

Thanks, Avik.

What I'm trying to establish is how I would go about writing out a
spreadsheet without having to build up the entire document model in memory
first. I'm reading data from a JDBC ResultSet and want to be able to read a
row from the ResultSet, generate the corresponding spreadsheet row, and send
it to the client (it's a Web client) immediately without having to buffer a
few tens of thousands of rows in memory on the server (since it'd kill the
server pretty quickly...).

I guess I was hoping that the Event API might help me here, but as far as I
can see, there's no way to use the 'eventusermodel' classes for writing a
document--I'd need to work directly with the low-level classes in the
'record' package. Looking at the code, it looks like what I'd have to do
(for each row) is:

- create the appropriate Records for the Excel spreadsheet row;
- create a byte array of the right size;
- copy the Records into the byte array using the Record.serialize(int
offset, byte[] data) method;
- write the byte array to my OutputStream;
- repeat for the next row & etc.

The catch, I guess, is knowing which records to put in which order. Guess
I'd need to get a copy of "Microsoft Excel 97 Developer's Kit" and brush up
on the Excel file format.



Best regards,

Robert Lowe
http://RMLowe.com/




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to