6 Replies Latest reply on Sep 19, 2008 12:42 PM by Robert Morse

    e;image example

    Robert Morse Apprentice

      Does someone have a seam-excel example showing the proper use of inserting an image using e:image?   I've exhausted just about all the obvious options, and the image is always distorted (usually too wide). 

        • 1. Re: e;image example
          Nicklas Karlsson Master
          <e:workbook xmlns:e="http://jboss.com/products/seam/excel"
               <e:worksheet name="Image">
                    <e:image URI="file:///c:/temp/mini_me.jpg" startRow="1" startColumn="0"/>

          Use of columnSpan/rowSpan not neccessary, as it will stretch the image in most cases (trying to fit
          it according to cells). The manual is not clear in that point, I cant give back your lost time but I'll fix the manual so someone elses time is saved ;-)

          • 2. Re: e;image example
            Robert Morse Apprentice

            Hi Nicklas!
            First, let me thank you for putting this together, and for replying to my question.   I have tried all variants of specifying startRow and Column (both zero, both undefined, one defined) and I still get distortion.  I even tried to merge a block of cells, and placing the image origin at the merged cell origin. Same type of distortion, but to varying degrees.  If it's nothing obvious, I'll continue to mess with it, but was hoping you might have some suggestions.   Thanks again for your reply!

            • 3. Re: e;image example
              Nicklas Karlsson Master

              File a JIRA with the xhtml, image and a screenshot on how it looks on your system + OS / Excel / Seam / AppServer / Java versions...

              • 4. Re: e;image example
                Nicklas Karlsson Master

                Looking more closely at the code, there could be a rounding distortion since the JExcelAPI works with colum/rowspans (making an inserted images align with cells). I'll have to check on the JExcelAPI forums for workarounds.

                • 5. Re: e;image example
                  Nicklas Karlsson Master

                  Or I could just read their javadocs myself.

                  Looks like a bug on my side, the colspan in their API is a double but I use a / without any casting, resulting in a truncated integer (and resizing to fit the columns).

                  • 6. Re: e;image example
                    Robert Morse Apprentice

                    Thank you Nicklas!  I won't create a JIRA (I needed to find a different image anyway, because the one I'm using is confidential to the client).
                    Thanks again for all of your help!