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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]