You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Michael Tsai <mi...@tatung.com> on 2004/07/05 04:02:05 UTC

Does HSSF support pictures in a Excel file?

Hi,
I tried to open a Excel file that has a picture in it, then write to
a new file, but the new file is totally blank (nothing in this file).

Does HSSF support pictures in a Excel file?
or is there any plan to support it?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Does HSSF support pictures in a Excel file?

Posted by Danny Mui <da...@muibros.com>.
you have to login first, im assuming you found the instructions here:
http://jakarta.apache.org/site/cvsindex.html

there are times when the network is congested or the server is down for 
maintenance.  try again :)

Michael Tsai wrote:

> Hi Danny,
> 
> I tried to check out the latest POI source code from CVS repository
> using the command:
> 
> cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout jakarta-poi
> 
> but it failed with the following message:
> 
> cvs [checkout aborted]: connect to cvs.apache.org(209.237.227.194):2401
> failed: Connection timed out
> 
> I've tried many times and I doubt the command I used was correct.
> Would you please point me to the right place or send me a copy of the latest
> POI source (mailto: michael@tatung.com) ?
> Thank you!
> 
> Regards,
> Michael
> 
> 
>>Hi Michael,
>>
>>Refetch the latest from CVS, a kind individual already contributed a fix
>>to this issue.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Does HSSF support pictures in a Excel file?

Posted by Michael Tsai <mi...@tatung.com>.
Hi Danny,

I tried to check out the latest POI source code from CVS repository
using the command:

cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout jakarta-poi

but it failed with the following message:

cvs [checkout aborted]: connect to cvs.apache.org(209.237.227.194):2401
failed: Connection timed out

I've tried many times and I doubt the command I used was correct.
Would you please point me to the right place or send me a copy of the latest
POI source (mailto: michael@tatung.com) ?
Thank you!

Regards,
Michael

> Hi Michael,
>
> Refetch the latest from CVS, a kind individual already contributed a fix
> to this issue.


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Does HSSF support pictures in a Excel file?

Posted by Danny Mui <da...@muibros.com>.
Hi Michael,

Refetch the latest from CVS, a kind individual already contributed a fix 
to this issue.

Danny Mui wrote:

> HSSF should not mangle your pictures in a template file, please submit 
> this bugzilla.
> 
> There are a bunch of alternatives on the site somewhere.
> 
> 
> Michael Tsai wrote:
> 
>> Hi Karl,
>>
>> Thanks for your response.
>> I'm using poi-2.5-final-20040302.jar, it's the latest version.
>> It's very easy to test, here is my code:
>>
>>   try {
>>     fin = new FileInputStream("book2.xls");
>>
>>     // Use POI to read the selected Excel Spreadsheet
>>     HSSFWorkbook workbook = new HSSFWorkbook(fin);
>>
>>     // Write to a new file
>>     fout = new FileOutputStream("output.xls");
>>     workbook.write(fout);
>>     fin.close();
>>     fout.close();
>>   }
>>   catch (Exception e) {
>>     throw new RuntimeException(e);
>>   }
>>
>> The Excel template file is attached, it just contains a picture (some 
>> Chinese words).
>> When I open the output.xls  with Excel,Excel told me this file is 
>> corrupted and need to be fixed, the picture just didn't show.
>>
>> If  POI does not support picture in Excel file, I must find another 
>> reporting tool, so I would like to know some decent Java reporting  
>> tool (commercial or free). Thank you!
>>
>> Regards,
>> Michael Tsai
>>
>>
>>> Hi Michael.
>>>
>>> I never used it myself. But according to the questions for this topic it
>>> should work. Possibly it's an error or you use an elder version.
>>>
>>> Regards, Karl-Heinz.
>>>
>>>
>>> Am Mo 05.07.2004 04:02 schrieb Michael Tsai <mi...@tatung.com>:
>>>
>>>
>>>> Hi,
>>>> I tried to open a Excel file that has a picture in it, then write to
>>>> a new file, but the new file is totally blank (nothing in this file).
>>>>
>>>> Does HSSF support pictures in a Excel file?
>>>> or is there any plan to support it?
>>>>
>>>> Thanks!
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Does HSSF support pictures in a Excel file?

Posted by Danny Mui <da...@muibros.com>.
HSSF should not mangle your pictures in a template file, please submit 
this bugzilla.

There are a bunch of alternatives on the site somewhere.


Michael Tsai wrote:

> Hi Karl,
> 
> Thanks for your response.
> I'm using poi-2.5-final-20040302.jar, it's the latest version.
> It's very easy to test, here is my code:
> 
>   try {
>     fin = new FileInputStream("book2.xls");
> 
>     // Use POI to read the selected Excel Spreadsheet
>     HSSFWorkbook workbook = new HSSFWorkbook(fin);
> 
>     // Write to a new file
>     fout = new FileOutputStream("output.xls");
>     workbook.write(fout);
>     fin.close();
>     fout.close();
>   }
>   catch (Exception e) {
>     throw new RuntimeException(e);
>   }
> 
> The Excel template file is attached, it just contains a picture 
> (some Chinese words).
> When I open the output.xls  with Excel,Excel told me this file 
> is corrupted and need to be fixed, the picture just didn't show.
> 
> If  POI does not support picture in Excel file, I must find 
> another reporting tool, so I would like to know some decent 
> Java reporting  tool (commercial or free). 
> Thank you!
> 
> Regards,
> Michael Tsai
> 
> 
>>Hi Michael.
>>
>>I never used it myself. But according to the questions for this topic it
>>should work. Possibly it's an error or you use an elder version.
>>
>>Regards, Karl-Heinz.
>>
>>
>>Am Mo 05.07.2004 04:02 schrieb Michael Tsai <mi...@tatung.com>:
>>
>>
>>>Hi,
>>>I tried to open a Excel file that has a picture in it, then write to
>>>a new file, but the new file is totally blank (nothing in this file).
>>>
>>>Does HSSF support pictures in a Excel file?
>>>or is there any plan to support it?
>>>
>>>Thanks!
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: poi-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: poi-user-help@jakarta.apache.org
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: poi-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Does HSSF support pictures in a Excel file?

Posted by Michael Tsai <mi...@tatung.com>.
Hi Karl,

Thanks for your response.
I'm using poi-2.5-final-20040302.jar, it's the latest version.
It's very easy to test, here is my code:

  try {
    fin = new FileInputStream("book2.xls");

    // Use POI to read the selected Excel Spreadsheet
    HSSFWorkbook workbook = new HSSFWorkbook(fin);

    // Write to a new file
    fout = new FileOutputStream("output.xls");
    workbook.write(fout);
    fin.close();
    fout.close();
  }
  catch (Exception e) {
    throw new RuntimeException(e);
  }

The Excel template file is attached, it just contains a picture 
(some Chinese words).
When I open the output.xls  with Excel,Excel told me this file 
is corrupted and need to be fixed, the picture just didn't show.

If  POI does not support picture in Excel file, I must find 
another reporting tool, so I would like to know some decent 
Java reporting  tool (commercial or free). 
Thank you!

Regards,
Michael Tsai

> Hi Michael.
>
> I never used it myself. But according to the questions for this topic it
> should work. Possibly it's an error or you use an elder version.
>
> Regards, Karl-Heinz.
>
>
> Am Mo 05.07.2004 04:02 schrieb Michael Tsai <mi...@tatung.com>:
>
> > Hi,
> > I tried to open a Excel file that has a picture in it, then write to
> > a new file, but the new file is totally blank (nothing in this file).
> >
> > Does HSSF support pictures in a Excel file?
> > or is there any plan to support it?
> >
> > Thanks!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: poi-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>

Re: Does HSSF support pictures in a Excel file?

Posted by Karl-Heinz Zengerle <ka...@sawag.com>.
Hi Michael.

I never used it myself. But according to the questions for this topic it
should work. Possibly it's an error or you use an elder version.

Regards, Karl-Heinz.


Am Mo 05.07.2004 04:02 schrieb Michael Tsai <mi...@tatung.com>:

> Hi,
> I tried to open a Excel file that has a picture in it, then write to
> a new file, but the new file is totally blank (nothing in this file).
> 
> Does HSSF support pictures in a Excel file?
> or is there any plan to support it?
> 
> Thanks!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org