Bug 33726 - Strange Formulas not parsed
Summary: Strange Formulas not parsed
Status: RESOLVED WONTFIX
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC Windows 2000
: P2 enhancement with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-24 11:09 UTC by A. KOZLOV
Modified: 2008-07-10 16:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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