You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Yuui TANAKA <ta...@yahoo.co.jp> on 2004/04/20 17:14:55 UTC
Error while cloning sheet including AutoShape objects
Hi,
I got the following error in cloning sheet including AutoShape objects
using POI 2.5 final.
Does anyone know anything about this problem? I got the source codes and
implemented/modified
clone() method of DrawingRecord and ObjRecord, but Excel couldn't open
the output file.
-- The error
Exception in thread "main" java.lang.RuntimeException: The class
org.apache.poi.hssf.record.DrawingRecord needs to define a clone method
at org.apache.poi.hssf.record.Record.clone(Record.java:194)
at org.apache.poi.hssf.model.Sheet.cloneSheet(Sheet.java:301)
at org.apache.poi.hssf.usermodel.HSSFSheet.cloneSheet(HSSFSheet.java:114)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.cloneSheet(HSSFWorkbook.java:339)
at Test.main(Test.java:32)
-- The following is the test code
FileInputStream in = new FileInputStream("sample.xls");
POIFSFileSystem fs = new POIFSFileSystem(in);
HSSFWorkbook workbook = new HSSFWorkbook(fs);
HSSFSheet sheet = workbook.cloneSheet(0); // error
FileOutputStream out = new FileOutputStream("sample_out.xls");
workbook.write(out);
Thanks,
Yuui TANAKA
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Error while cloning sheet including AutoShape objects
Posted by Danny Mui <da...@muibros.com>.
can you attach the sample excel file to a bug report?
it will help get your particular addressed sooner.
Yuui TANAKA wrote:
> Hi,
>
> I got the following error in cloning sheet including AutoShape objects
> using POI 2.5 final.
> Does anyone know anything about this problem? I got the source codes and
> implemented/modified
> clone() method of DrawingRecord and ObjRecord, but Excel couldn't open
> the output file.
>
> -- The error
> Exception in thread "main" java.lang.RuntimeException: The class
> org.apache.poi.hssf.record.DrawingRecord needs to define a clone method
> at org.apache.poi.hssf.record.Record.clone(Record.java:194)
> at org.apache.poi.hssf.model.Sheet.cloneSheet(Sheet.java:301)
> at org.apache.poi.hssf.usermodel.HSSFSheet.cloneSheet(HSSFSheet.java:114)
> at
> org.apache.poi.hssf.usermodel.HSSFWorkbook.cloneSheet(HSSFWorkbook.java:339)
> at Test.main(Test.java:32)
>
> -- The following is the test code
> FileInputStream in = new FileInputStream("sample.xls");
> POIFSFileSystem fs = new POIFSFileSystem(in);
> HSSFWorkbook workbook = new HSSFWorkbook(fs);
>
> HSSFSheet sheet = workbook.cloneSheet(0); // error
>
> FileOutputStream out = new FileOutputStream("sample_out.xls");
> workbook.write(out);
>
>
> Thanks,
> Yuui TANAKA
>
> ---------------------------------------------------------------------
> 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