1 2 3 4 5 6 7 Previous Next 96 Replies Latest reply on Jan 26, 2011 6:32 AM by carsi Go to original post
      • 45. Re: Excel for Seam preview
        This is sort of Nicklas area of expertise, but I have asked the same question :-)

        You could try to create your own xls in excel and add formulas for adding cells etc in this workbook. For instance in C1 you could have SUM(A1:B1). Save the xls and pass it to the <e:workbook templateURI="<uri-to-file>">. Fill the sheet's A1 and B1 cells with some values using e:column and e:cell and hopefully the summing will stay intact in c1...

        I haven't tried it myself, but if it doesn't work (and iff the component is added to seam), you could probably file a JIRA later on.
        • 46. Re: Excel for Seam preview
          nickarls

          I'm still out of touch with the code until monday but something like


            <e:formula value="Sheet1!A1+Sheet2!B2"/>
          



          should work. Or shall we say, will work sooner or later ;-)

          • 47. Re: Excel for Seam preview
            nickarls

            Currently the style parser seem to support


               // Font attributes
               private static final String FONTNAME = "xlsFontName";
               private static final String FONTSIZE = "xlsFontSize";
               private static final String FONTCOLOR = "xlsFontColor";
               private static final String FONTBOLD = "xlsFontBold";
               private static final String FONTITALIC = "xlsFontItalic";
               private static final String FONTSCRIPTSTYLE = "xlsFontScriptStyle";
               private static final String FONTSTRUCKOUT = "xlsFontStruckOut";
               private static final String FONTUNDERLINESTYLE = "xlsFontUnderlineStyle";
               
               // Background attributes
               private static final String BACKGROUNDCOLOR = "xlsBackgroundColor";
               private static final String BACKGROUNDPATTERN = "xlsBackgroundPattern";
               
               // Cell attributes
               private static final String ALIGNMENT = "xlsAlignment";
            
               // Column attributes
               private static final String COLUMN_WIDTH = "xlsColumnWidths";
            



            but I'll put the border things on top of the list when expanding the features...


            • 48. Re: Excel for Seam preview
              nickarls

              They will probably be something like


              xlsBorderColor (all)
              xlsLeftBorderColor
              xlsTopBorderColor
              xlsRightBorderColor
              xlsBottomBorderColor
              xlsBorderLineStyle (all)
              xlsLeftBorderLineStyle
              xlsTopBorderLineStyle
              xlsRightBorderLineStyle
              xlsBottomBorderLineStyle
              

              • 49. Re: Excel for Seam preview
                brachie

                Nicklas Karlsson wrote on Jul 18, 2008 21:14:


                I'm still out of touch with the code until monday but something like

                  <e:formula value="Sheet1!A1+Sheet2!B2"/>
                



                should work. Or shall we say, will work sooner or later ;-)


                @Nicklas: Thanks for the positive answer :-) So this kind of formula definition does not work yet? When approximately can we expect that cool feature to work?


                Regards,


                Alexander

                • 50. Re: Excel for Seam preview
                  nickarls

                  I think the formula tag is in the latest version. If not, it will be in the new latest version I'll roll out sometimes next week once I get back to work, clean out the most pressing work-stuff that has accumulated during my vacation and migrate my development environment to my new laptop.

                  • 51. Re: Excel for Seam preview
                    yuly_gordy

                    Hi!


                    I am very interesting in seam-excel functionality, but I wasn't able to download jboss-seam-excel.jar even when I was logged into jira.jboss with my jboss.org login. Can you help me to get it, please.


                    Yuliya

                    • 52. Re: Excel for Seam preview
                      nickarls

                      If you can wait until tomorrow I'll wrap up some bugfixes/changes and post a fresh version.

                      • 53. Re: Excel for Seam preview
                        nickarls

                        There is a new version out that can be downloaded here


                        Changes:



                        • Fixed empty string errors (better null handling of data)

                        • Formulas should now be working, e.g.



                        <e:formula value="SheetOne!A1+SheetTwo!A1"/>




                        • Support for border color and line style in datatable exporter, e.g.



                          <h:datatable style="xlsBorderColor:red;xlsBorderLineStyle:thick;xlsBorderColorRight:blue;xlsBorderLineStyleRight:dotted" ...>
                        



                        which should produce cells with thick red borders (but the right border is blue and dotted. You can also use templates with the styles like


                          <h:datatable style="xlsBordeColor.foo:red" ...>
                          and later on
                          <h:outputText style="xlsTemplates:foo" .../>
                          
                        



                        the complete list of new tags are


                           xlsBorderColor
                           xlsBorderColorLeft
                           xlsBorderColorTop
                           xlsBorderColorRight
                           xlsBorderColorBottom
                           xlsBorderLineStyle
                           xlsBorderLineStyleLeft
                           xlsBorderLineStyleTop
                           xlsBorderLineStyleRight
                           xlsBorderLineStyleBottom
                        



                        There is still and issue (in document mode) with format masks and templates due to the fact that the format mask can't be changed later on when cascading templates but it can be worked around by placing the mask at the first template like


                        <e:cellTemplate name="foo" mask="0.0"/>
                        and
                        <e:cell templates="foo"/>
                        



                        (using templates in the cell but placing the mask in the cell would result in the mask being ignored)


                        I just noticed that I forgot to fix the typo in horizontal freeze in this release, it's hard to use a thread of 50+ posts for managing bug reports ;-) There will be an update soon.

                        • 54. Re: Excel for Seam preview
                          yuly_gordy

                          Hi Nicklas,


                          I'm getting this exception:
                          javax.faces.FacesException: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.excel.ui.UIWorkbookSettings


                          Could you advise something?


                          Yuliya

                          • 55. Re: Excel for Seam preview
                            nickarls

                            Hmmm, that one is obsolete, cleaned it up in faces-config.xml. The new jar can be downloaded here. Wonder why I didn't run into that...


                            This version also has some improvements (hopefully) for freezing and grouping...

                            • 56. Re: Excel for Seam preview
                              yuly_gordy

                              Is there anywhere svn branch for seam-excel project? If so, can you post the link? Or how can I have the latest version of this project source and some examples, documentation?  

                              • 57. Re: Excel for Seam preview
                                accountclosed

                                Wow. I read from the JIRA link:


                                Nicklas Karlsson - 23/Jul/08 03:39 AM
                                Latest version as of 2008-07-23
                                Changes:


                                  Formulas should be working, e.g. <e:formula value="Sheet1!A1+Sheet2!A2"/>



                                Two things:
                                1) Talk about just coming out of the oven (23rd last update), still smoking!
                                2) Forumulas ... Yes!


                                Yet another reason why this framework adds incredible amounts of utility. Thanks Seam developers!


                                Seriously I feel like one of those guys in the Budweiser commercial with the magic fridge. Magic fridge ... Magic fridge ...


                                :)

                                • 58. Re: Excel for Seam preview

                                  Hopefully it will be in the Seam trunk soon. How soon I cannot answer at the moment, but I'll see if we can put the newest source in the jira during next week.

                                  • 59. Re: Excel for Seam preview
                                    nickarls

                                    A preliminary alpha-version (careful enough?) of the docs can be found here