Bug 36941 - HSSFCell.getCellFormula() returns "NO IDEA SHARED FORMULA EXP PTG"
Summary: HSSFCell.getCellFormula() returns "NO IDEA SHARED FORMULA EXP PTG"
Status: RESOLVED DUPLICATE of bug 20321
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-05 22:36 UTC by Andreas Korthaus
Modified: 2006-07-11 19:48 UTC (History)
0 users



Attachments
the Excel File causing the problem (17.50 KB, application/vnd.ms-excel)
2005-10-05 22:41 UTC, Andreas Korthaus
Details
Java code for reading the formula (569 bytes, text/plain)
2005-10-05 22:43 UTC, Andreas Korthaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Korthaus 2005-10-05 22:36:43 UTC
I have an Excel file with some formulas, some of them return "NO IDEA SHARED
FORMULA EXP PTG" when I use:

HSSFCell.getCellFormula()

I have found some postings and some bugs with similar issues, some seem to
fixed, some not. Seems to have something to do with "shared formulas". Since I
use the latest version of POI (poi-3.0-alpha1-20050704.jar) and I don't know if
it's the same issue, I opened a new bug to attatch my excel sheet causing the
problems. I cannot reproduce such a "problematic" excel sheet by myself, it
comes from someone else.

If I change the values of some cells in the sheet, that's not a problem. I also
can copy the cells to an other spreadsheet or workbook - the problem "survives".

Only if I remove a complete row or a complete column before (in Excel!), the
formulas suddenly appear when I try to read them using HSSFCell.getCellFormula().

You can find the problematic cells / formulas in G59:G64

I also attatched a (very) simple java class for testing.

Some other Bugs/Postings talk about similar problems and patches for it, but I
can't find a POI version where these patches are applied, or it must be a
different problem.

I don't understand how people can use Formula Reading from POI, the error
happend with the latest version of POI and with the third Excel file I ever tested!
Comment 1 Andreas Korthaus 2005-10-05 22:41:10 UTC
Created attachment 16601 [details]
the Excel File causing the problem

try to read formulas from G59:G64 using HSSFCell.getCellFormula() 

You can use the Java file from second attatchement as a "draft"
Comment 2 Andreas Korthaus 2005-10-05 22:43:07 UTC
Created attachment 16602 [details]
Java code for reading the formula
Comment 3 Trejkaz (pen name) 2006-07-12 02:48:25 UTC

*** This bug has been marked as a duplicate of 20321 ***