You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Daniel Green <ma...@gmail.com> on 2005/10/07 16:05:27 UTC

image in a template being lost when written to new file

Hi, I'm having trouble with an image. I have an Excel file with an
image and several merged cells. I open it up in my app, add rows
(after the image and merged cells), and then write it out to a new
file. However, when I open the resulting file in Excel it looks
nothing like the template and I get a message the file is corrupted:

Microsoft Office Excel File Repair Log
Errors were detected in file 'myfile.xls'
The following is a list of repairs:
Damage to the file was so extensive that repairs were not possible.
Excel attempted to recover your formulas and values, but some data may
have been lost or corrupted.

The image is gone, and the merged cells have all un-merged. I know POI
has trouble with images (I'm using 2.5), but from searching the
archives I thought it would be fine if I didn't do anything to the
image or the cells/rows it's in. Is there anything I can do to
preserve the contents/format of the template better? Thanks in advance
for any help you can give.

Dan

Re: image in a template being lost when written to new file

Posted by Daniel Green <ma...@gmail.com>.
Excellent, thanks a lot! I don't know why I couldn't find it before, but I
just tried it out and it worked perfectly.

Dan

On 10/10/05, Thibaut Nicolas <th...@yahoo.fr> wrote:
>
> you can find the binaries in the archives :
> http://archive.apache.org/dist/jakarta/poi/release/bin/
>
> Thibaut
>
>
> Daniel Green a écrit :
> > Interesting. I just tried 3.0-alpha and that worked, but I'm a bit leary
> of
> > using an alpha version in a production environment. I looked on the
> mirrors
> > and none of them had 2.0. Do I need to check it out of the repository or
> did
> > you find binaries somewhere?
> >
> > Dan
> >
> > On 10/7/05, Thibaut Nicolas <th...@yahoo.fr> wrote:
> >
> >>I also had problems with images in an Excel template with POI 2.5.
> >>I'm currently using version 2.0 which works fine with images.
> >>
> >>I have no idea if this version keeps merged cells.
> >>
> >>Thibaut
> >>
> >>
> >>Daniel Green a écrit :
> >>
> >>>Hi, I'm having trouble with an image. I have an Excel file with an
> >>>image and several merged cells. I open it up in my app, add rows
> >>>(after the image and merged cells), and then write it out to a new
> >>>file. However, when I open the resulting file in Excel it looks
> >>>nothing like the template and I get a message the file is corrupted:
> >>>
> >>>Microsoft Office Excel File Repair Log
> >>>Errors were detected in file 'myfile.xls'
> >>>The following is a list of repairs:
> >>>Damage to the file was so extensive that repairs were not possible.
> >>>Excel attempted to recover your formulas and values, but some data may
> >>>have been lost or corrupted.
> >>>
> >>>The image is gone, and the merged cells have all un-merged. I know POI
> >>>has trouble with images (I'm using 2.5), but from searching the
> >>>archives I thought it would be fine if I didn't do anything to the
> >>>image or the cells/rows it's in. Is there anything I can do to
> >>>preserve the contents/format of the template better? Thanks in advance
> >>>for any help you can give.
> >>>
> >>>Dan
> >>>
> >>
> >>
> >>---------------------------------------------------------------------
> >>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: image in a template being lost when written to new file

Posted by Thibaut Nicolas <th...@yahoo.fr>.
you can find the binaries in the archives :
http://archive.apache.org/dist/jakarta/poi/release/bin/

Thibaut


Daniel Green a écrit :
> Interesting. I just tried 3.0-alpha and that worked, but I'm a bit leary of
> using an alpha version in a production environment. I looked on the mirrors
> and none of them had 2.0. Do I need to check it out of the repository or did
> you find binaries somewhere?
> 
> Dan
> 
> On 10/7/05, Thibaut Nicolas <th...@yahoo.fr> wrote:
> 
>>I also had problems with images in an Excel template with POI 2.5.
>>I'm currently using version 2.0 which works fine with images.
>>
>>I have no idea if this version keeps merged cells.
>>
>>Thibaut
>>
>>
>>Daniel Green a écrit :
>>
>>>Hi, I'm having trouble with an image. I have an Excel file with an
>>>image and several merged cells. I open it up in my app, add rows
>>>(after the image and merged cells), and then write it out to a new
>>>file. However, when I open the resulting file in Excel it looks
>>>nothing like the template and I get a message the file is corrupted:
>>>
>>>Microsoft Office Excel File Repair Log
>>>Errors were detected in file 'myfile.xls'
>>>The following is a list of repairs:
>>>Damage to the file was so extensive that repairs were not possible.
>>>Excel attempted to recover your formulas and values, but some data may
>>>have been lost or corrupted.
>>>
>>>The image is gone, and the merged cells have all un-merged. I know POI
>>>has trouble with images (I'm using 2.5), but from searching the
>>>archives I thought it would be fine if I didn't do anything to the
>>>image or the cells/rows it's in. Is there anything I can do to
>>>preserve the contents/format of the template better? Thanks in advance
>>>for any help you can give.
>>>
>>>Dan
>>>
>>
>>
>>---------------------------------------------------------------------
>>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: image in a template being lost when written to new file

Posted by Daniel Green <ma...@gmail.com>.
Interesting. I just tried 3.0-alpha and that worked, but I'm a bit leary of
using an alpha version in a production environment. I looked on the mirrors
and none of them had 2.0. Do I need to check it out of the repository or did
you find binaries somewhere?

Dan

On 10/7/05, Thibaut Nicolas <th...@yahoo.fr> wrote:
>
> I also had problems with images in an Excel template with POI 2.5.
> I'm currently using version 2.0 which works fine with images.
>
> I have no idea if this version keeps merged cells.
>
> Thibaut
>
>
> Daniel Green a écrit :
> > Hi, I'm having trouble with an image. I have an Excel file with an
> > image and several merged cells. I open it up in my app, add rows
> > (after the image and merged cells), and then write it out to a new
> > file. However, when I open the resulting file in Excel it looks
> > nothing like the template and I get a message the file is corrupted:
> >
> > Microsoft Office Excel File Repair Log
> > Errors were detected in file 'myfile.xls'
> > The following is a list of repairs:
> > Damage to the file was so extensive that repairs were not possible.
> > Excel attempted to recover your formulas and values, but some data may
> > have been lost or corrupted.
> >
> > The image is gone, and the merged cells have all un-merged. I know POI
> > has trouble with images (I'm using 2.5), but from searching the
> > archives I thought it would be fine if I didn't do anything to the
> > image or the cells/rows it's in. Is there anything I can do to
> > preserve the contents/format of the template better? Thanks in advance
> > for any help you can give.
> >
> > Dan
> >
>
>
> ---------------------------------------------------------------------
> 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: image in a template being lost when written to new file

Posted by Thibaut Nicolas <th...@yahoo.fr>.
I also had problems with images in an Excel template with POI 2.5.
I'm currently using version 2.0 which works fine with images.

I have no idea if this version keeps merged cells.

Thibaut


Daniel Green a écrit :
> Hi, I'm having trouble with an image. I have an Excel file with an
> image and several merged cells. I open it up in my app, add rows
> (after the image and merged cells), and then write it out to a new
> file. However, when I open the resulting file in Excel it looks
> nothing like the template and I get a message the file is corrupted:
> 
> Microsoft Office Excel File Repair Log
> Errors were detected in file 'myfile.xls'
> The following is a list of repairs:
> Damage to the file was so extensive that repairs were not possible.
> Excel attempted to recover your formulas and values, but some data may
> have been lost or corrupted.
> 
> The image is gone, and the merged cells have all un-merged. I know POI
> has trouble with images (I'm using 2.5), but from searching the
> archives I thought it would be fine if I didn't do anything to the
> image or the cells/rows it's in. Is there anything I can do to
> preserve the contents/format of the template better? Thanks in advance
> for any help you can give.
> 
> Dan
> 


---------------------------------------------------------------------
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/