1 3 4 5 6 7 Previous Next 96 Replies Latest reply on Jan 26, 2011 6:32 AM by carsi Go to original post
      • 90. Re: Excel for Seam preview
        nickarls

        Last time I checked (about six months or so ago), JExcelAPI had much better performance and memory footprint. I was also more familiar with JExcelAPI. But supporting POI and other libraries are just a matter of implementing an interface and registering the implementation in components.xml.

        • 91. Re: Excel for Seam preview
          nickarls

          This thread is getting really long.


          Now that the module has been trunkified, I recommend that new topics are started


          Click Thread locked ;-)

          • 92. Re: Excel for Seam preview
            anilerukala

            Hi Daniel,


            I modified the getWrappedData() to return listRow (mentioned in the example). Basically listRow contains the records that the user is seeing on the web page (eg.10 employee records instead of 50,000 records). Now it is exporting the data to excel. But it is not exporting the column headers when they have commandlinks associated with it. If i just have h:outputText instead of a4j:commandLink it is exporting the headers properly. Here is my code.


            <rich:column> 
             <f:facet name="header"> 
              <a4j:commandLink value="Employee Name" reRender="employeeTable"> 
              <a4j:actionparam name="sortField" value="employeeName" /> 
              </a4j:commandLink> 
             </f:facet> 
             <h:outputText value="{employee.employeeName}" />
            </rich:column>



            Here is the list of questions that I have.


            1. What is the solution for exporting headers of a datatable when the table header has commandLink associated with it (above mentioned problem)?


            2. I am not sure whether returning the listRow in the getWrappedData() is the right implementation or not. But it is working. Could you please show me a good example of extended data model which works with export to excel?


            3. If i want to export 50,000 records instead of 10 records (no. of records on the web page), is it a good idea to call getAll() in getWrappedData()?


            Nicklas already mentioned that this thread is getting bigger. If you want to create a new topic please redirect me to your reply.


            Thanks,

            Anil

            • 93. Re: Excel for Seam preview
              nickarls

              Reply here

              • 94. Re: Excel for Seam preview
                anilerukala

                Nicklas, after I login I do not see the reply button for the new topic Excel export and extended datamodel etc. So for now I am posting my questions here. 


                This is related to my previous question 3. When I called getAll() which returns 50,000 records to export into excel, the memory is growing up bigger and bigger. It is not scaling well. That is why I started using extended data model so that I get small amounts of data (10/20/50 records at a time) using the datascroller.


                Using excelExport component, is it possible to export all the data (eg. 50,000 records) by iteratively (eg. 1000 records at a time) reading the data from DB and writing the data to excel?


                What is the best way to export all the data to excel instead of giving an iterator that will return all the rows at a time?

                • 95. Re: Excel for Seam preview
                  nickarls

                  Hmmm, I have admin rights so perhaps there was some read only as default.


                  Are you hitting out of memory errors? the JVM hogs what it can get and GCs when it's running low.
                  I've generated excel-documents with JExcelAPI in the range of 250+Mb (12 worksheets, 8 columns, 65k-rows)
                  with a 32bit JVM (~1,5M mem) so it should survive 50k-rows in most cases.


                  The iterator is a non-issue since JExcelAPI collects the data before writing no matter how many parts you
                  give the data in.

                  • 96. Re: Excel for Seam preview
                    carsi

                    Hello,


                    I would like to ask something about rich:datatable excel export. I can successfully export the data table as an excel file. But I would like to add an important information in first row of the excel as well. Is it possible to do that?


                    In this example below I tried to add Description of the Data Table centences in the first row of the excel but It didnt worked. I just got the values from rich columns.





                    <h:form id="excelExport">    
                        <rich:dataTable rowKeyVar="rowKey" value="#{policeList.resultList}" var="police" id="policeList" width="450px" height="400px" > 
                            <f:facet name="header"> 
                                <h:outputText value="Description of the Data Table" /> 
                            </f:facet> 
                     
                            <rich:column width="100px" sortable="true" filterBy="#{police.policeNo}" filterEvent="onkeyup"> 
                                <f:facet name="header"> 
                                    <h:outputText value="Policy No" /> 
                                </f:facet> 
                                <h:outputText value="#{police.policeNo}" id="policeNo" /> 
                            </rich:column> 
                     
                            <rich:column width="200px" sortable="true" filterBy="#{police.policeAdi}" filterEvent="onkeyup"> 
                                <f:facet name="header"> 
                                    <h:outputText value="Policy Name" /> 
                                </f:facet> 
                                <h:outputText value="#{police.policeAdi}" id="name" /> 
                            </rich:column> 
                     
                        </rich:dataTable>
                        <h:commandButton id="exporter" type="Submit" value="Export to Excel" action="#{org.jboss.seam.excel.exporter.excelExporter.export('excelExport:policeList')}" />
                    </h:form>



                    1 3 4 5 6 7 Previous Next