-
1. Re: Export to Excel from rich:datatable
moldovan Sep 25, 2008 4:21 AM (in response to rajevar)You can do it by your own!
Have a look at: http://poi.apache.org/
Regards -
2. Re: Export to Excel from rich:datatable
toomtooms Oct 15, 2008 3:56 PM (in response to rajevar)I think too that this would be a good thing to be able to export rich datatable (in Excel, PDF, ...).
I know that I can do it by myself (and this is what I've done usnig http://wiki.apache.org/myfaces/Exporting_DataTable_To_MS-Excel),but before using JSF I used displaytag and it was so easy to export the data table ! I was really surprised when I noticed that it wasn't possible with richfaces (and with most of the JSF components librairies). -
3. Re: Export to Excel from rich:datatable
toomtooms Feb 4, 2009 5:21 PM (in response to rajevar)Will this functionnality be planned in a future version ?
-
4. Re: Export to Excel from rich:datatable
rschoeler Feb 5, 2009 8:55 AM (in response to rajevar)Hi toomtooms, I have faced the same problem for a few days and have found one Open Source possibility for doing this.
This is the Link to the component:
http://jsf-comp.sourceforge.net/components/index.html
Another URL - with a litte bit description regarding this topic:
http://jroller.com/mert/entry/jsfexcelcreator_is_now_in_jsf
Personally I haven't tried this, because I wanted an XLS, with a lot more data and other structuring and therefore I have implemented my own solution.
Based on jXLS http://jxls.sourceforge.net/
But maybe you or rajevar will give the jsf-comp a try and post your experience in this post?
wfg
roland -
5. Re: Export to Excel from rich:datatable
toomtooms Feb 6, 2009 5:52 PM (in response to rajevar)Thank you for your answer, I will try the jsf-comp component.
Until now here are the ways I tried :
1 - http://wiki.apache.org/myfaces/Exporting_DataTable_To_MS-Excel
This solution works very fine if you don't use pagnation. Indeed, this exports only what is displayed. So, filtering and sorting are taken in count. But if you use pagination, it only exports thecurrent page.
2 - PrimeFaces Optimus exportActionListener component (http://www.rehberharitam.com/primefaces-examples/optimus/exporter.jsf)
This component works fine, even with pagination. The only issue is when using external filtering. External filtering (filterMethod attribute) is not taken in count, and of course my rich:datatable has an external filtering :(
Where can I suggest to add this feature natively in a future version of RichFaces ? In JIRA ? -
6. Re: Export to Excel from rich:datatable
nbelaevski Feb 6, 2009 6:12 PM (in response to rajevar)Hello,
Read this: http://www.seamframework.org/Community/ExcelForSeamPreview. RF and Seam integrate very nice. -
7. Re: Export to Excel from rich:datatable
toomtooms Feb 10, 2009 9:34 AM (in response to rajevar)My JSF application doesn't use Seam or Facelet at all. Do I have to make a lot of changes to integrate the Seam's Excel Export component ?
I've added jboss-seam-excel.jar and jxl.jar in my WEB-INF/lib but I have the following error :The function export must be used with a prefix when a default namespace is not specified
Do I have to change my web.xml and add a components.xml file, as mentionned in http://www.seamframework.org/Community/RichdatatableToExcelExportIsEasyButIGetError ? -
8. Re: Export to Excel from rich:datatable
ilya_shaikovsky Feb 10, 2009 9:37 AM (in response to rajevar)You should use seam instructions. RF not influence on such seam features and settings anyhow.
-
9. Re: Export to Excel from rich:datatable
toomtooms Feb 26, 2009 12:50 PM (in response to rajevar)I just want to share what I finally done :
I did a mistake, PrimeFaces works fine with external filters. There was still a little problem : it doesn't export headers from a rich:columnGroup.
So I've downloaded the excelExporter component from the MyFaces sandbox and adapted it to my need (to export headers from a rich:columnGroup for example), and it works very fine !
But it would be so cool to add this feature natively in the rich:datatable component !
Thank you for your help. -
10. Re: Export to Excel from rich:datatable
jerem Sep 19, 2014 9:44 AM (in response to rajevar)I needed also this functionality so I took the primefaces dataExporter component and modified it to use it with Richfaces. I also added the capability to export collapsibleSubTable insides tables.
Primefaces and Richfaces are opensource, feel free to improve it.
Package containing sources and examples:
-
-
12. Re: Export to Excel from rich:datatable
jerem Sep 25, 2014 5:12 PM (in response to godoy)I agree, but I didn't find your component when I searched a component to export data with richfaces, too late. I'm a bit angry against myself ! I think it's because access to Github is blocked in my company ... stupid security policy.
It need more advertisement.
I don't see on the Github if it exports also collapsibleSubTables inside datatables ? Does it ?
-
13. Re: Export to Excel from rich:datatable
godoy Sep 26, 2014 6:34 AM (in response to jerem)Here at My company also is all locked, yet there is no support for collapisbleSubTable, but I think something is not very difficult to implement, when I downloaded the code from github, did not support extended DataTable, and I even implemented this feature was simple and fast.
I think it's already at the time of RichFaces provide these types of features, I see many new projects changing richfaces to primefaces components because these utilities. -
14. Re: Export to Excel from rich:datatable
jerem Sep 26, 2014 1:04 PM (in response to godoy)Yes, clearly. In my company architects decide to choose Richfaces instead of Primefaces because they choose JBoss EAP with support option, and so they are more confident to use JBoss components for the full stack, and also because RedHat is a big boss in Java world. But the lack of components of Richfaces compare to Primefaces nearly changed the decision. And in a previous company, where we have the choice, we choose at project start to use Primefaces just after we compare their showcases, so much we were impressed by the diversity of components and features of Primefaces. It's strange Richfaces keeps being outrunned so much.