Bug 33726

Summary: Strange Formulas not parsed
Product: POI Reporter: A. KOZLOV <green_spam_fr>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED WONTFIX    
Severity: enhancement    
Priority: P2    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   

Description A. KOZLOV 2005-02-24 11:09:20 UTC
I have a formulas on my Excel sheet looking like this:

='C:\blp\api\dde\Blp.xla'!blp($B1;A$3:B$3;;;BLP|M!'EUSA1 Curncy,
[NAME,PX_BID]')

If you need an Excel sheet for your tests, just create a new one and paste the 
formula. Excel will ask you to start BLP.EXE application, answer no, then Excel 
will ask you where it can find BLP.XLA, just click cancal. That's all.

After parsing this Excel file the following code:

POIFSFileSystem fileSystem = new POIFSFileSystem(new FileInputStream
(fileInput));
HSSFWorkbook workbook = new HSSFWorkbook(fileSystem);
System.out.println(workbook.getSheetAt(0).getRow(0).getCell((short) 
0).getCellFormula());

prints the following string:

NO IDEA - NAME($B1,A$3:B$3, , ,NO IDEA - NAME)

I'm not sure that it is possible (i.e. that Excel gives us this possibility), but we can 
just choose to parse or not to parse the formulas. In my case I want just to read 
the formula, change "EUSA1 Curncy" to "EUSA2 Curncy" and write it to Excel. No 
need to really parse the formula.
Comment 1 Avik Sengupta 2005-04-22 13:27:41 UTC
Unfortunately, we cannot give you access to the parts of a formula without
parsing it. And your formula is one the most complex types you can write :(
Comment 2 Nick Burch 2008-07-10 16:05:40 UTC
At this time, we do not support excel formulas that utilise third party extensions, sorry