Yes, its interesting. :-)
nice to hear ;)
I've experimented with JExcel API (http://jexcelapi.sourceforge.net/). My first xhtml pages look like:
<x:workbook xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:x="http://jboss.com/products/seam/xls"> <x:sheet name="test1"> <x:label row="0" column="0" text="header1"/> <x:label row="0" column="1" text="header2"/> <x:label row="1" column="0" text="value1"/> <x:label row="1" column="1" text="value2"/> </x:sheet> <x:sheet name="test2"/> <x:sheet name="test3"/> </x:workbook>
It should be also easy to generate tables similar to Seam-PDF, various fonts, images, formulas, charts (limited).
I also think that classes from org.jboss.seam.pdf (not from org.jboss.seam.pdf.ui) could be reused for the Excel stuff (we just need to add DocType.XLS("xls", "application/msexcel") to org.jboss.seam.pdf .DocumentData. Furthermore some basic and non PDF-specific functionality (processing facets etc.) could be probably reused as well.
If it sounds feasible I could go on and add a Seam-XLS package with some examples.
Go for it, I'm pretty sure I would accept a contribution like this - as long as the code is nice ;-)
cool, I'll do it! What steps do I have to follow if I want to contribute (or is there any how-to-contribute-wiki-page)?
btw I'll be on vacation in SF area in the next 2 weeks (I'm not sure whether I catch the Seam&Hibernate meetup, but hey, now I know what to do during my 12-hours-flight ;)
I've been devising an application for some time now. One of my requirements is to have Excel as an output filetype. The moment I saw the PDF generation feature I thought of this requirement. I would definitely use it if it looks anything like the PDF code.
well, except for different/excel-specific tags, my feeling is that for the user it should be pretty much the same (i.e. minimum/no specific config, dynamic lists/tables etc.)
exactly, I meant with the same ease of use.
Create an issue in JIRA.
Attach any new files you write to it, along with diff format patches to any files you change.
And make sure you include an example application, based along the lines of the PDF example, so that we can see that it works ;-)
I think Excel support is a great idea. How about something like this
I never used it, but I think that it lets you use a special data table tag that will export the data automatically. It is not JSF.
This could allow for general data tables to be exported without having to write another page to generate the file.
Is it possible to make this work with any JSF DataTable without having to code a special page for every list of data I want to be exported to Excel?
I've used displayTag and it's been great and I've always missed a similar for JSF. So how about creating s:dataTable which extends h:dataTable and adds support for
1) Exporting to CSV,XML,Excel,PDF
I'd like to use those features from some of the already available JSF libraries like http://facestutorials.icefaces.org/tutorial/dataTable-tutorial.html , but unfortunately it's just too difficult and complex to use those 3rd party JSF stuff which you don't have full control of.
Anyone has any information whether next version of h:dataTable will add support for exporting, sorting or paging?
Maybe do both, x:worksheet etc just like in SeamPDF and then using that create s:dataTable for simple Excel export support. Then you could x: for more complex worksheets etc.
+1 for SeamX (x:)
Btw, does JExcel also work in non-windows OSes?
So how about creating s:dataTable which extends h:dataTable and adds support for
1) Exporting to CSV,XML,Excel,PDF
Well, this is definitly not the way I would go. (As a matter of fact tomahawk has done some of the stuff but last time I looked at it it was chaotic).
What I would wish is a tag lib which really produces genuine excel files - including formulas, cell types, number formats. It would be ideal if one could use an original excel file as a "template". Then one would add pivot tables and nice little graphs to the tamplate, the user could specify some filters and aggragation levels and then the pivot data would be copied to the excel file.
This would make a LOT of controllers very, very happy.
I agree with Felix.
While this certainly sounds interesting I was wondering why you guys want to use MS Excel instead of OpenDocument file format (http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office#technical) ?
Sure MS Office is widely spread but ODF is an international industry standard that is supported by a wide variety of applications (like OpenOffice) and doesn't lock you in with a file format thats just a pain in the ass if one doesn't use it with MS Office on MS Windows.
So how about using ODF (which can be imported into MS Office too if it has to be) ?
I do love the idea of the PDF templating using facelets in Seam for doing up quick documents and e-mails -- but the idea of adding Excel support then leads to the plethora of other output formats that you can think of.. and does all that fluff (and re-inventing of the wheel) really belong in Seam?
I think most people who need a large variety of output formats will settle on a more full-featured reporting framework anyway. So rather than putting Excel support into Seam, I think tools for integrating JasperReports or BIRT with Seam JSF pages would be much more helpful. Especially for customers who already may have a significant investment in jasper reports and want to now render them via a Seam web app?