Boris,

I think your message got a bit underlooked: I agree it is quite a dirty
trick, but it actually seems to work.

I tried on both Excel 97 and 2000: in both cases the file gets correctly
opened, and it retains the original HTML formatting (multiple colspan,
colors, etc.). As you save the file from within Excel, it seems to get saved
in XLS binary format, which prevents further HTML conversions as the file is
opened later.

Since I think that most time spent on M$ proprietary formats could be better
spent :-), I definitely suggest anyone needing such a solution to give it a
try.

I actually added such a line to the sitemap:

<map:serializer
        name="xls"
        mime-type="application/vnd.ms-excel"
        src="org.apache.cocoon.serialization.HTMLSerializer"
>


I think that the POI HSSF approach is definitely the right way to go, but I
also think that it can be quite time-consuming (the need to write an
alternate XSL in yet-another markup language can be quite tedious,
especially for complex tables, since the GNumeric format also requires you
to think in quite a different way from HTML table logic).


I would appreciate any comments,

L.



-----Messaggio originale-----
Da: Boris Althaus [mailto:boris@;petra-productions.de]
Inviato: luned́ 28 ottobre 2002 17.43
A: [EMAIL PROTECTED]
Oggetto: Re: XML to Excel file


Hi Chris,
 when you set the content-type in a servlet like 
"response.setContentType("application/vnd.ms-excel");"
a simple html-table will opened as excel-file, if Excel is installed.

but i think it is not a question for [EMAIL PROTECTED] 

Boris


----- Original Message ----- 
From: Dorsey, Chris 
To: [EMAIL PROTECTED] 
Sent: Monday, October 28, 2002 5:25 PM
Subject: XML to Excel file


Does anyone have recommendations on how to get from an XML stream to an
Excel file without using cocoon?

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to