You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/08/27 15:21:21 UTC
DO NOT REPLY [Bug 47747] New: java.lang.RuntimeException: Shared
Formula Conversion: Coding Error
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
Summary: java.lang.RuntimeException: Shared Formula Conversion:
Coding Error
Product: POI
Version: unspecified
Platform: PC
OS/Version: Windows Vista
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: kevinrmckee@hotmail.com
--- Comment #0 from kevinrmckee@hotmail.com 2009-08-27 06:21:18 PDT ---
Created an attachment (id=24176)
This zip contains the original and processed spreadsheets.
I have tried version 3.5, 3.6 and 3.7.
When trying to run the following code to go through a spreadsheet and update
the formula values, I get several errors (java.lang.RuntimeException: Shared
Formula Conversion: Coding Error). When I open the newly created spreadsheet,
several cells have #REF issues. I will attach the original and processed
spreadsheets.
public static void RecalculateFormulas(String filename) throws
FileNotFoundException, IOException
{ try{
FileInputStream fis = new FileInputStream(filename);
FileOutputStream out = new
FileOutputStream(filename.replaceAll(".xls","temp.xls"));
HSSFWorkbook wb = new HSSFWorkbook(fis); //or new
XSSFWorkbook("/somepath/test.xls")
FormulaEvaluator evaluator =
wb.getCreationHelper().createFormulaEvaluator();
for(int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++) {
org.apache.poi.ss.usermodel.Sheet sheet = wb.getSheetAt(sheetNum);
for(org.apache.poi.ss.usermodel.Row r : sheet) {
for(org.apache.poi.ss.usermodel.Cell c : r) {
if(c.getCellType() ==
org.apache.poi.ss.usermodel.Cell.CELL_TYPE_FORMULA) {
try{evaluator.evaluateFormulaCell(c);}
catch(Exception e)
{System.out.println(e.toString());}
}
}
}
}
wb.write(out);
out.close();
}
catch(Exception e)
{System.out.println(e.toString());
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
--- Comment #3 from David Fisher <df...@jmlafferty.com> 2009-09-02 11:04:26 PDT ---
Until a POI developer evaluates this patch and applies it to the trunk the
patch is only available here or from the contributing developer.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
--- Comment #6 from David Fisher <df...@jmlafferty.com> 2009-09-16 20:11:01 PDT ---
*** Bug 47855 has been marked as a duplicate of this bug. ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
--- Comment #1 from Petr.Udalau <Pe...@exigenservices.com> 2009-08-31 03:59:21 PDT ---
Created an attachment (id=24191)
Patch resolves the problem.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
--- Comment #2 from kevinrmckee@hotmail.com 2009-09-02 10:40:21 PDT ---
(In reply to comment #1)
> Created an attachment (id=24191) [details]
> Patch resolves the problem.
Thanks, but is there a new build of the JAR file which will contain this patch,
or do I have to download all of the source and rebuild it?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
Josh Micich <jo...@gildedtree.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Josh Micich <jo...@gildedtree.com> 2009-09-17 17:44:53 PDT ---
Fixed in svn r816417
There was a problem with the way POI associated formula records with the
corresponding shared formula records. The actual fix needed to be made much
earlier than where the patch suggested (By that stage the formula record had
already been attached to the wrong shared formula).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
--- Comment #4 from kevinrmckee@hotmail.com 2009-09-02 14:07:54 PDT ---
(In reply to comment #3)
> Until a POI developer evaluates this patch and applies it to the trunk the
> patch is only available here or from the contributing developer.
Any idea when that might happen so I can utilize this new fix? How often do
patches get added to the trunk?
Thanks
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
kevinrmckee@hotmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |47855
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
kevinrmckee@hotmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kevinrmckee@hotmail.com
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47747] java.lang.RuntimeException: Shared Formula
Conversion: Coding Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47747
--- Comment #5 from kevinrmckee@hotmail.com 2009-09-09 08:54:26 PDT ---
(In reply to comment #3)
> Until a POI developer evaluates this patch and applies it to the trunk the
> patch is only available here or from the contributing developer.
I downloaded
http://encore.torchbox.com/poi-svn-build/poi-3.5-beta7-20090909.jar but I still
have the same error. Has this patch been included in the version I downloaded?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org