Sends file contents directly to the output stream, setting the
Content-Type and writing back to the browser a
tab-delimited file (Excel digests this fine). We used to use POI to compose an Excel
binary data file, but its outrageous memory consumption didn't
scale for large result sets. POI assembles the its output in
memory. After study of the native OLE2 Excel file format, it
appears very difficult to generate the file in another fashion.
Regards output encoding, for now we're assuming the response
stream is appropriately set upon fetching. Also, we're assuming
that Excel will do the right thing on receipt of our TSV file with
Japanese or other multibyte characters (we're not setting an
encoding on the Content-Type we return). Both of the
above to be verified.
author: John McNally author: St.Ack author: Daniel Rall since: Scarab 1.0 |