-
1. Re: Need more excel function to controll the content.
nickarls Feb 25, 2009 1:43 PM (in response to leon850515)- You could try the merge command for the title
- Dropdowns? (not supported) Multiple lines per cell? (ui:repeat)
-
2. Re: Need more excel function to controll the content.
nickarls Feb 25, 2009 1:44 PM (in response to leon850515)Or if you want to get low-level, use JExcelAPI directly and push the generated bytes to the browser.
-
3. Re: Need more excel function to controll the content.
leon850515 Feb 25, 2009 4:52 PM (in response to leon850515)Thanks for the response, I have successfully done the item1 using the e:mergeCells tag.
For item2, the content of the column is a Multiple lines per cell style. The column in page is as belows:
<rich:column> <h:dataTable value="#{merchant.profiles}" var="profile"> <h:column> <h:outputText profile.getName}" /> </h:column> </h:dataTable> </rich:column>
The ui:repeat can't work. Plus I'm not familiar with the JExcelAPI. Do you think JExcelAPI can do that? If so, I will investigate that.
-
4. Re: Need more excel function to controll the content.
danielc.roth Feb 25, 2009 9:09 PM (in response to leon850515)Sorry, subtables is not supported and probably never will be. Try to model your table differently and use the merge to merge the columns in the
parent
table. -
5. Re: Need more excel function to controll the content.
danielc.roth Feb 25, 2009 9:19 PM (in response to leon850515)Since it's just a vertical list you could do it with ui:repeat:
<rich:column> <e:cell> <ui:repeat value="#{merchant.profiles}" var="profile"> <h:outputText profile.getName}" /> <!-- some kind of excel sign for linebreak --> <ui:repeat> </e:cell> </rich:column>
-
6. Re: Need more excel function to controll the content.
leon850515 Feb 26, 2009 3:41 AM (in response to leon850515)Like I said, it can't work with ui:repeat. The content in the cell will all be empty.
In the seam excel doc, the e:cell tag only has 3 child elements: e:font, e:border, e:background.
So I think you can't nest ui:repeat in the e:cell tag. Maybe that's why I get empty content.
-
7. Re: Need more excel function to controll the content.
nickarls Feb 26, 2009 7:47 AM (in response to leon850515)What documentation/version? Those existed a long time ago and disappeared (somewhere before 2.1 RC2?) in favor of css attributes?
ui:repeat and other facelet tags are
one level above
the excel tags so they don't need permission to be nested.Try using a normal line break char \n but remember to set the cell wrapping to true.
-
8. Re: Need more excel function to controll the content.
leon850515 Feb 26, 2009 11:25 AM (in response to leon850515)I use the doc in this jira https://jira.jboss.org/jira/browse/JBSEAM-2896. So maybe my jboss-seam-excel.jar file is old too, because the facelet tag can't work.
I tried the normal line break and set the cell wrapping to true, it can't work either.
-
9. Re: Need more excel function to controll the content.
nickarls Feb 26, 2009 11:31 AM (in response to leon850515)Don't use that version, it's so old it can break your computer and possibly your car, too! Use the one in 2.1.x
-
10. Re: Need more excel function to controll the content.
lavanyak Jul 14, 2010 6:34 AM (in response to leon850515)Hi Nicklas,
Need help.
I had created a excel using seam excel support. My excel sheet is creted as desired except I am not able to change the color of any text in the tag
<e:cell/>
conditionally. Below is the code snippet that I am using to make it work -
<e:cell value="#{employee.name}" style="xls-font-size: 8; xls-font-color:#{employee.resigned ? 'black' : 'red' }"/>
Please suggest if I am wrong somewhere in the usage.
Thanks.
-
11. Re: Need more excel function to controll the content.
lavanyak Jul 14, 2010 6:43 AM (in response to leon850515)employee is simple java bean.
I put system.out.println in employee.isResigned() method.
The above mentioned <e:cell/> executed only once despite that the list 'employees' has 10 records. The code snippet is below that I am using -
<e:worksheet name="employees" value="#{employees}" var="employee"> <e:cell value="#{employee.name}" style="xls-font-size: 8; xls-font-color:#{employee.resigned ? 'black' : 'red' }"/> </e:worksheet>
Please suggest, how can I make that work?
-
12. Re: Need more excel function to controll the content.
nico.ben Jul 21, 2010 11:49 AM (in response to leon850515)It seems that EL are not parsed inside style attribute in e:cell.
Could you confirm? -
13. Re: Need more excel function to controll the content.
lavanyak Jul 21, 2010 12:47 PM (in response to leon850515)EL are parsed inside style attribute in e:cell only for first row of the worksheet.
For the further rows in the collection, it uses the cache value of styleclass or style attributes.
-
14. Re: Need more excel function to controll the content.
nico.ben Jul 21, 2010 1:03 PM (in response to leon850515)So there's no way to colour my column cells under some circumstances?