poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Pahne ...@der-die-das.org>
Subject excel and diagrams again
Date Fri, 26 Nov 2004 14:12:05 GMT

hello,

after some resarch and some help by this mailing list I found out that 
it is currently not suppported to create diagrams in Excel files with POI.

Then I tried to create a "template Excel" workbook that contains a 
sample sheet with just enough dummy data to generate the diagram (and 
the diagram, of course). I thought that was a clever idea, but obviously 
I was wrong.

Has anybody tried the same and was more succesfull?

I have no idea how to implement this missing clone() method. Has anybody?

Bye,
Andy



I read in my template.xls like this:


______________________________________________________________________

// read in the workbook with the template worksheet
// create a POIFSFileSystem object to read the data
POIFSFileSystem fs = new POIFSFileSystem(
     new FileInputStream( configurationService.getXLSTemplateFile()));

// create a bew workbook based on the POIFSFileSystem object
HSSFWorkbook workbook = new HSSFWorkbook(fs);

______________________________________________________________________


No problem so far. But when I try to clone my template sheet like this:

______________________________________________________________________

HSSFSheet anotherSheet = workbook.cloneSheet(0);
______________________________________________________________________


I get A RuntimeException "The class 
org.apache.poi.hssf.record.DrawingRecord needs to define a clone method"

With the stack trace:
Stack Trace:

     * org.apache.poi.hssf.record.Record.clone(Record.java:194)
     * org.apache.poi.hssf.model.Sheet.cloneSheet(Sheet.java:320)
     * 
org.apache.poi.hssf.usermodel.HSSFSheet.cloneSheet(HSSFSheet.java:114)
     * 
org.apache.poi.hssf.usermodel.HSSFWorkbook.cloneSheet(HSSFWorkbook.java:337)
     * itoskop.web.ExcelReportService.service(ExcelReportService.java:220)
     * 
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)
     * 
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)
     * 
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)
     * javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
     * javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     * 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     * 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     * 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
     * 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     * 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     * 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
     * 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
     * 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     * 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     * 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
     * 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     * 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
     * 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     * 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     * 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     * 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     * 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     * org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
     * 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
     * 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
     * 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
     * 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
     * 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
     * java.lang.Thread.run(Thread.java:534)




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


Mime
View raw message