Serializing to Excel in Cocoon is simple. This example shows you how to edit the MinimalSitemapConfiguration to add XLS Serialization. For more information on the XLSSerializer see the Cocoon user guide. For more information on the Gnumeric file format see

You will need to have an XSLT page that transforms your data into the correct tag language, but assuming you've gotten there, here are the changes you'd make to the sitemap:

<?xml version="1.0" encoding="iso-8859-1"?>
<map:sitemap xmlns:map="">

    <!-- use the standard components -->
        <map:generators default="file"/>
        <map:transformers default="xslt"/>
        <map:readers default="resource"/>
<!-- this is changed -->
        <map:serializers default="html"> 
              <map:serializer name="xls"                
                   mime-type="application/" locale="us"/>
<!-- this is changed -->
        <map:selectors default="browser"/>
        <map:matchers default="wildcard"/>
        <map:transformers default="xslt"/>
    <!-- let cocoon know how to process requests -->
            <!-- respond to *.html requests with 
                 our docs processed by doc2html.xsl -->
            <map:match pattern="*.html">
                <map:generate src="{1}.xml"/>
                <map:transform src="doc2html.xsl"/>
                <map:serialize type="html"/>

<!-- added XLS matcher here -->
            <!-- respond to *.xls requests with 
                 our docs processed by doc2xls.xsl -->
            <map:match pattern="*.xls">
                <map:generate src="{1}.xml"/>
                <map:transform src="doc2xls.xsl"/>
                <map:serialize type="xls"/>
<!-- end added XLS matcher here -->

XLSSerializer (last edited 2009-09-20 23:42:57 by localhost)