You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by jb...@sqli.com on 2005/04/18 18:32:12 UTC

Problems with images in XLS templates files using POI.

Hi,

I discovered POI a few months ago and find it cool because most of my
needs are covered by this library.

The context I work in :
- 100% Java application on a webserver
- POI 2.5 (I cannot use POI 2.0 since I use methods that don't exist in 2.0)
- XLS templates (Excel 2000), sometimes with charts and macros.
- A program merges a template with data extracted from an Oracle DataBase
on the fly.
- The newly created XL document is then sent to the end user.
- When opening the document, the macro builds the final document,
processing the data with a given set of parameters, building the final
chart(s).

So far, everything works fine (thanks !)

BUT :
- When I simply add a logo to my document (a gif/jpeg image for example),
- The document processing seems to work fine
- When I open the generated XL document, it seems to be corrupted and XL
juste tell me "Unable to open document".

I've written dozens of XL templates, from the more complicated to the most
simple, and most of the time, the created file is just corrupted
(depending on the input image i use).

I've red things about that kind of problems, and answers about Escher
objects, but even when I just have *a single image in an empty
spredsheet*, the XL file becomes corrupted.

Are there any specific limitations to the use of images in templates ?
See an image that doesn't work in attachement.

Thanks in advance for your help

Julien, FRANCE.


Re: Problems with images in XLS templates files using POI.

Posted by Sanjiv Jivan <sa...@gmail.com>.
I had a similar issue where when I added a graphic to an Excel form in
my template file, the generated excel file would get corrupt.

I found a posting related to this when searching google groups but I
can seem to locate that right now. It mention this as a ms bug related
to images in excel files and macros. Will post the url if locate it.

Sanjiv

On 4/18/05, jbeausseron@sqli.com <jb...@sqli.com> wrote:
> Hi,
> 
> I discovered POI a few months ago and find it cool because most of my
> needs are covered by this library.
> 
> The context I work in :
> - 100% Java application on a webserver
> - POI 2.5 (I cannot use POI 2.0 since I use methods that don't exist in 2.0)
> - XLS templates (Excel 2000), sometimes with charts and macros.
> - A program merges a template with data extracted from an Oracle DataBase
> on the fly.
> - The newly created XL document is then sent to the end user.
> - When opening the document, the macro builds the final document,
> processing the data with a given set of parameters, building the final
> chart(s).
> 
> So far, everything works fine (thanks !)
> 
> BUT :
> - When I simply add a logo to my document (a gif/jpeg image for example),
> - The document processing seems to work fine
> - When I open the generated XL document, it seems to be corrupted and XL
> juste tell me "Unable to open document".
> 
> I've written dozens of XL templates, from the more complicated to the most
> simple, and most of the time, the created file is just corrupted
> (depending on the input image i use).
> 
> I've red things about that kind of problems, and answers about Escher
> objects, but even when I just have *a single image in an empty
> spredsheet*, the XL file becomes corrupted.
> 
> Are there any specific limitations to the use of images in templates ?
> See an image that doesn't work in attachement.
> 
> Thanks in advance for your help
> 
> Julien, FRANCE.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Problems with images in XLS templates files using POI.

Posted by R S <tc...@gmail.com>.
I had a problem with image size. If it's a huge image in the template,
the generated file gets corrupted. I tried with a smaller logo and it
worked fine. I haven't researched why this happens. And I may be
entirely wrong on the image size as well. But you could try reducing
the size of the logo.

RS

On 4/18/05, jbeausseron@sqli.com <jb...@sqli.com> wrote:
> Hi,
> 
> I discovered POI a few months ago and find it cool because most of my
> needs are covered by this library.
> 
> The context I work in :
> - 100% Java application on a webserver
> - POI 2.5 (I cannot use POI 2.0 since I use methods that don't exist in 2.0)
> - XLS templates (Excel 2000), sometimes with charts and macros.
> - A program merges a template with data extracted from an Oracle DataBase
> on the fly.
> - The newly created XL document is then sent to the end user.
> - When opening the document, the macro builds the final document,
> processing the data with a given set of parameters, building the final
> chart(s).
> 
> So far, everything works fine (thanks !)
> 
> BUT :
> - When I simply add a logo to my document (a gif/jpeg image for example),
> - The document processing seems to work fine
> - When I open the generated XL document, it seems to be corrupted and XL
> juste tell me "Unable to open document".
> 
> I've written dozens of XL templates, from the more complicated to the most
> simple, and most of the time, the created file is just corrupted
> (depending on the input image i use).
> 
> I've red things about that kind of problems, and answers about Escher
> objects, but even when I just have *a single image in an empty
> spredsheet*, the XL file becomes corrupted.
> 
> Are there any specific limitations to the use of images in templates ?
> See an image that doesn't work in attachement.
> 
> Thanks in advance for your help
> 
> Julien, FRANCE.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/