0 Replies Latest reply on Mar 17, 2010 2:30 PM by dolly dolly

    export data to excel

    dolly dolly Newbie
      Hello all,

      I am new to this group.This is my first post.
      My requirement is my jsp displays tabe and below that there will be link and when i click that click table data should be exported to excel.I am using rich dataTable with seam framework.

      Here is my JSP code
      <h:form id="theForm">
      <rich:dataTable id="ShowJitCategories"
                                value="#{ShowJitCategories.metals}"
                                var="metalThickness">
                               <f:facet name="header">
      </rich:dataTable>
      <h:commandLink  value="Export" actionListener="#{org.jboss.seam.excel.exporter.ExcelExporter.export('theForm:ShowJitCategories')}"/>
      </h:form>

      I added this in my web.xml
      <context-param>
              <param-name>webAppRootKey</param-name>
                      <param-value>seam-excel</param-value>
         </context-param>
      <servlet>
            <servlet-name>Document Store Servlet Excel</servlet-name>
            <servlet-class>org.jboss.seam.excel.DocumentStoreServlet</servlet-class>
         </servlet>
      <servlet-mapping>
            <servlet-name>Document Store Servlet Excel</servlet-name>
            <url-pattern>*.xls</url-pattern>
         </servlet-mapping>

      I added this to my components.xml
      <components xmlns:excel="http://jboss.com/products/seam/excel">
              <excel:document-store use-extensions="true" />
      </components>

      I followed all the steps suggested by you people. But still  i am not able to do it.When i open my jsp its giving me error as"The function export must be used with a prefix when a default namespace is not specified
      ".
      Its urgent requirement in my project. Please let me know if i did any mistake in my code.
      Thanks in advance.