Hi,
I am already using POI 3 Alpha version.
It seems to be OK when the charts have small data (2 columns and 3 rows).
And when the data is bigger I get the error.
My test is this one (I only load the tenplate and write it into a new file):
public class MyXLSTest {
public static void main(String[] args) {
copy("test_bar1.xls", "output_bar1.xls");
copy("test_bar2.xls", "output_bar2.xls");
copy("test_line1.xls", "output_line1.xls");
copy("test_line2.xls", "output_line2.xls");
}
public static void copy(String input, String output){
try {
POIFSFileSystem fs = new POIFSFileSystem(new
FileInputStream(input));
HSSFWorkbook wb = new HSSFWorkbook(fs);
FileOutputStream fileOut = new
FileOutputStream(output);
wb.write(fileOut);
fileOut.flush();
fileOut.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
I ran this test with different input and I got this conclusion.
Are you sure that it is fixed for all charts?
Thank you.
Lucille
-----Original Message-----
From: dedy rustandi [mailto:[EMAIL PROTECTED]
Sent: 31 March 2007 02:18
To: POI Users List
Subject: Re: Chart sheet problem - Unable to read file
You should use POI 3 Alpha version. That bug has been fixed
----- Original Message -----
From: "Lucille DJARA" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, March 31, 2007 12:35 AM
Subject: Chart sheet problem - Unable to read file
> Hi,
>
>
>
> I am trying to use the HSSF API to:
>
> 1. load a template contaning a chart sheet 2. write data 3. save the new
> file with the data
>
>
>
> It is OK when the chart sheet is the last sheet of my workbook, but when
> there are other sheets after the chart sheet I get the message "Unable to
> read file" from MS Excel. It is OK with OpenOffice.
>
> If I do Save As with OpenOffice, then I can open it with MS Excel
>
>
>
> Can somebody tell me what to do in order that my file can be open with MS
> Excel?
>
>
>
> Thanks
>
>
>
> Lucille
>
>
>
>
----------------------------------------------------------------------------
----
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.23/740 - Release Date: 2007/03/30
13:15
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/