Bug 26502 - [PATCH] Conversion of Shared Formula to individual Formula
Summary: [PATCH] Conversion of Shared Formula to individual Formula
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P3 normal with 8 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-28 21:29 UTC by Jason Height
Modified: 2006-11-07 07:20 UTC (History)
0 users



Attachments
org\apache\poi\hssf\record\formula\AreaAPtg.java (3.96 KB, text/java)
2004-01-28 21:30 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\AreaNAPtg.java (3.86 KB, text/java)
2004-01-28 21:31 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\AreaNPtg.java (3.81 KB, text/java)
2004-01-28 21:31 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\AreaNVPtg.java (3.83 KB, text/java)
2004-01-28 21:32 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\AreaVPtg.java (3.96 KB, text/java)
2004-01-28 21:32 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\RefAPtg.java (3.59 KB, text/java)
2004-01-28 21:34 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\RefNAPtg.java (3.77 KB, text/java)
2004-01-28 21:34 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\RefNPtg.java (3.75 KB, text/java)
2004-01-28 21:34 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\RefNVPtg.java (3.69 KB, text/java)
2004-01-28 21:35 UTC, Jason Height
Details
org\apache\poi\hssf\record\formula\RefVPtg.java (3.51 KB, text/java)
2004-01-28 21:35 UTC, Jason Height
Details
The shared formula patch to existing files. (23.85 KB, patch)
2004-01-28 21:36 UTC, Jason Height
Details | Diff
getCellFormula() returns NO IDEA SHARED FORMULA EXP PTG (142.00 KB, application/octet-stream)
2005-06-07 20:14 UTC, vanishree narasimhan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Height 2004-01-28 21:29:00 UTC
Please find attached a patch that i had done some time ago. This was done
against the HEAD.

Avik, I havent tried to apply it against HEAD recently, but hopefully it is ok.
Comment 1 Jason Height 2004-01-28 21:30:58 UTC
Created attachment 10121 [details]
org\apache\poi\hssf\record\formula\AreaAPtg.java
Comment 2 Jason Height 2004-01-28 21:31:25 UTC
Created attachment 10122 [details]
org\apache\poi\hssf\record\formula\AreaNAPtg.java
Comment 3 Jason Height 2004-01-28 21:31:46 UTC
Created attachment 10123 [details]
org\apache\poi\hssf\record\formula\AreaNPtg.java
Comment 4 Jason Height 2004-01-28 21:32:09 UTC
Created attachment 10124 [details]
org\apache\poi\hssf\record\formula\AreaNVPtg.java
Comment 5 Jason Height 2004-01-28 21:32:32 UTC
Created attachment 10125 [details]
org\apache\poi\hssf\record\formula\AreaVPtg.java
Comment 6 Jason Height 2004-01-28 21:34:18 UTC
Created attachment 10126 [details]
org\apache\poi\hssf\record\formula\RefAPtg.java
Comment 7 Jason Height 2004-01-28 21:34:38 UTC
Created attachment 10127 [details]
org\apache\poi\hssf\record\formula\RefNAPtg.java
Comment 8 Jason Height 2004-01-28 21:34:58 UTC
Created attachment 10128 [details]
org\apache\poi\hssf\record\formula\RefNPtg.java
Comment 9 Jason Height 2004-01-28 21:35:23 UTC
Created attachment 10129 [details]
org\apache\poi\hssf\record\formula\RefNVPtg.java
Comment 10 Jason Height 2004-01-28 21:35:41 UTC
Created attachment 10130 [details]
org\apache\poi\hssf\record\formula\RefVPtg.java
Comment 11 Jason Height 2004-01-28 21:36:45 UTC
Created attachment 10131 [details]
The shared formula patch to existing files.
Comment 12 Jason Height 2004-01-28 21:38:00 UTC
I found my patch file that only contained the shared formula stuff. Have a look
at it and see how it goes. Sorry that i dont have the time to apply it myself

Jason
Comment 13 Ulrich Bode 2004-07-16 13:43:49 UTC
Patch does not work.

1. Add this Method to FormulaRecord (missed)
    public void setParsedExpression(List newParsedExpression)
    {
      field_8_parsed_expr = (Stack) newParsedExpression;  
    }
2. method construct defect
The method "construct" in class ValueRecordsAggregate throws 
a "RuntimeException "Shared formula bit set but next record not Shared 
Formula??"
or the FormulaRecord formula could be null.

mail@ulrich-bode.de
Comment 14 Avik Sengupta 2004-07-16 13:58:05 UTC
Can you provide an xl file that bombs? Reopening, since even if the patch is not
complete, we still have the issue and need to fix it. 
Comment 15 vanishree narasimhan 2005-06-07 20:14:52 UTC
Created attachment 15328 [details]
getCellFormula()  returns NO IDEA SHARED FORMULA EXP PTG


   The last column is a formula column in my attached excel sheet ,it is not
being read by POI.
    System.out.println("srcCell.getCellFormula() ="+srcCell.getCellFormula());
	returns "NO IDEA SHARED FORMULA EXP PTG"
	
It fails in HSSFFormulaEvaluator at the following code block

	 FormulaParser parser = new FormulaParser(srcCell.getCellFormula(),
workbook.getWorkbook());
	 parser.parse(); //as parser expected an excel formula rather than a
String
	
Can anyone help me read the formula cell's value.

Thanks
regards
Vani.
Comment 16 Bernhard Gruber 2006-05-23 13:25:09 UTC
Anybody still working on this? It seems to be the same problem in bugIds #20321 
and #36941. When will shared formuals be supported?
Comment 17 Jason Height 2006-07-25 14:28:35 UTC
Implemented in SVN. Works OK.
Comment 18 C. A. Caillibot 2006-11-07 07:20:54 UTC
(In reply to comment #17)

Should it be working in POI 3.0 alpha2?