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.
Created attachment 10121 [details] org\apache\poi\hssf\record\formula\AreaAPtg.java
Created attachment 10122 [details] org\apache\poi\hssf\record\formula\AreaNAPtg.java
Created attachment 10123 [details] org\apache\poi\hssf\record\formula\AreaNPtg.java
Created attachment 10124 [details] org\apache\poi\hssf\record\formula\AreaNVPtg.java
Created attachment 10125 [details] org\apache\poi\hssf\record\formula\AreaVPtg.java
Created attachment 10126 [details] org\apache\poi\hssf\record\formula\RefAPtg.java
Created attachment 10127 [details] org\apache\poi\hssf\record\formula\RefNAPtg.java
Created attachment 10128 [details] org\apache\poi\hssf\record\formula\RefNPtg.java
Created attachment 10129 [details] org\apache\poi\hssf\record\formula\RefNVPtg.java
Created attachment 10130 [details] org\apache\poi\hssf\record\formula\RefVPtg.java
Created attachment 10131 [details] The shared formula patch to existing files.
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
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
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.
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.
Anybody still working on this? It seems to be the same problem in bugIds #20321 and #36941. When will shared formuals be supported?
Implemented in SVN. Works OK.
(In reply to comment #17) Should it be working in POI 3.0 alpha2?