<% response.setContentType("..."); %> <!-- part 1 -->
HTML part <!-- part 2 -->
Can we "translate" the "Part I" into some understandable things and put together with "Part II", then save it as a ".xls" file ?
Originally posted by Jeanne Boyarsky:
You can build an Excel file at runtime containing anything you want. For simple files, you can just output a comma delimited file. For more comples ones, look into Apache's HSSF/POI.
thanks. But, I still want to know if the approach I mentioned is feasible.
Originally posted by Jeffrey Spaulding:
Jeanne's answer actually meant "Yes"
With POI (look up the meaning of the acronym, it's worth it)
you have a (somewhat limited) access to the Object Model of
You construct the Objects and stream them out to a fil, which
obviously happens on the serverside.
pardon me if I still don't get it. I think that, if I use my original methodology, on the server, I still only get that JSP page with a different content type. I don't really have an excel .xls generated.
Am I right ?
Although I know nothing about POI, it looks like a different way to do things and it generates files directly I guess.
If you send a PDF-formatted stream to the browser and tell the browser that the content type is a Word document, obviously no automatic conversion will take place.
That's where tools like POI come in, and why it's a spectacularly bad idea to do something like this in a JSP.
[ September 07, 2005: Message edited by: Bear Bibeault ]