4 Replies Latest reply on Jun 23, 2009 12:52 AM by grundor

    Trouble rendering Excel file, render succeeds, but no file

      In my application I am already able to successfully render Excel files from rich:dataTable's using excelExporter.export.


      I am now trying to create and render an Excel document using the Seam excel tags, but although the render call comes back without error, no document appears to be generated.


      Here is the document I am trying to render:


      <e:workbook xmlns:e="http://jboss.com/products/seam/excel">
           <e:worksheet name="Developers">
                <e:cell column="0" row="0" value="Daniel Roth"/>
                <e:cell column="0" row="1" value="Nicklas Karlsson"/>
           </e:worksheet>
      </e:workbook>
      



      My code that does the render:



          public boolean export() {
                try {
                     Renderer.instance().render("/admin/regprogram/signups_export.xhtml");
                     facesMessages.add("Excel export successful"); 
                } catch (Exception e) {
                    facesMessages.add("Excel export failed: " + e.getMessage());
                    return false;
                }
                return true;
          }



      I have added the following to my components.xml:



         <document:document-store use-extensions="true"/>
      



      And my web.xml contains:



        <servlet>
          <servlet-name>Document Store Servlet</servlet-name> 
          <servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class> 
        </servlet>
        <servlet-mapping>
          <servlet-name>Document Store Servlet</servlet-name> 
          <url-pattern>*.csv</url-pattern> 
        </servlet-mapping>
        <servlet-mapping>
          <servlet-name>Document Store Servlet</servlet-name> 
          <url-pattern>*.xls</url-pattern> 
        </servlet-mapping>



      What could I be missing?  Must be a problem with my configuration that does not affect the ability to export from rich:dataTable...


      Much appreciate if anyone has any suggestions.


      -Mark