Hi Reto,
        We are almost doing the same task. Reading from Template and
generating Working Copy of Excel File.

If you can provide sample template with Sample Java Code, It will be
very helpful to us.

Thanks,
Harsh


-----Original Message-----
From: Reto Badertscher [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 21, 2003 9:09 PM
To: [EMAIL PROTECTED]
Subject: Formula / Graph Support


We are producing spreadsheets by taking a template with Formulas and
Graphs 
and generate data cells at runtime. It works good, but one has to be
careful 
how to enter the formulas. 
Using the 1.9.0-dev-200030129 version we found the following issues:
- cells which are copied (copy/paste) do not work, we must manually
change 
each formula
- when the formula contains a  'DSUM' ('DBSUMME' in the german excel
version) 
copied formulas do work
- when such a formula does end with a division (e.g.
'=DSUM(xx!A:AC)/100') 
the template could not be read. See the stacktrace below.

If it helps i can provide a sample template

Reto

Stacktrace when reading template 
java.lang.reflect.InvocationTargetException
        at
sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java
:254)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.jav
a:192)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:187)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:154)
        at sims.model.report.XL_COUGraph.write(XL_COUGraph.java:121)
        at sims.model.report.ReportRunner.run(ReportRunner.java:46)
        at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 55
        at
org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:557)
        at
org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:90)
        at 
org.apache.poi.hssf.record.formula.ReferencePtg.<init>(ReferencePtg.java
:107)
        at
org.apache.poi.hssf.record.formula.Ptg.createPtg(Ptg.java:210)
        at 
org.apache.poi.hssf.record.FormulaRecord.getParsedExpressionTokens(Formu
laRecord.java:171)
        at 
org.apache.poi.hssf.record.FormulaRecord.fillFields(FormulaRecord.java:1
47)
        at org.apache.poi.hssf.record.Record.fillFields(Record.java:143)
        at org.apache.poi.hssf.record.Record.<init>(Record.java:105)
        at
org.apache.poi.hssf.record.FormulaRecord.<init>(FormulaRecord.java:118)
        ... 10 more

---------------------------------------------------------------------
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]

Reply via email to