poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33726] New: - Strange Formulas not parsed
Date Thu, 24 Feb 2005 10:09:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33726>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33726

           Summary: Strange Formulas not parsed
           Product: POI
           Version: 2.5
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: green_spam_fr@yahoo.com


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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message