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 <[EMAIL PROTECTED]>:
>
> > 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
Book2.xls
Description: MS-Excel spreadsheet
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
