You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2006/01/23 21:29:31 UTC

DO NOT REPLY [Bug 38358] New: - Unable to parse formula

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=38358>.
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=38358

           Summary: Unable to parse formula
           Product: POI
           Version: 2.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: pitilezard@gmail.com


I have to do a report with some value issued from an AS400. Anyway, when I put
all my values and finally my formula, all other formula works perfectly but
YIELD(TODAY()+3;V5;W5;... and so on, dosn't work...

The formula is parsed without any errors, and as a result, we ca see in the Cell :

TODAY()+3;otherparams;)XYIELD

where X is a strange caracter (sometimes a chinese sign, or a rectangle ...)

I have to explain to my client that he must click on the Cell and click Enter
and after that, copy the formula right down ... I've putted my formula with a
'=' and in string type ...

I've search a lot but there is apparently any other possibility to put a formula
and to bypass the parsing done by HSSF ...

So if its possible when you know that your way is not completely finished,
provide another possibilty or a workaround ... If there is one, I'm really
interested !!!!

-- 
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/


DO NOT REPLY [Bug 38358] - Unable to parse formula

Posted by bu...@apache.org.
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=38358>.
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=38358





------- Additional Comments From pitilezard@gmail.com  2006-02-02 14:03 -------
(In reply to comment #0)
> I have to do a report with some value issued from an AS400. Anyway, when I put
> all my values and finally my formula, all other formula works perfectly but
> YIELD(TODAY()+3;V5;W5;... and so on, dosn't work...
> 
> The formula is parsed without any errors, and as a result, we ca see in the Cell :
> 
> TODAY()+3;otherparams;)XYIELD
> 
> where X is a strange caracter (sometimes a chinese sign, or a rectangle ...)
> 
> I have to explain to my client that he must click on the Cell and click Enter
> and after that, copy the formula right down ... I've putted my formula with a
> '=' and in string type ...
> 
> I've search a lot but there is apparently any other possibility to put a formula
> and to bypass the parsing done by HSSF ...
> 
> So if its possible when you know that your way is not completely finished,
> provide another possibilty or a workaround ... If there is one, I'm really
> interested !!!!

Sorry for the so long gap between my answers.

Some functions usefull to understand my code :

	public HSSFCell getCell(HSSFSheet sheet,int row,int col,int type) {
		HSSFRow r = sheet.getRow(row);
		if (r == null) {
			r = sheet.createRow(row);
		}
		HSSFCell c = r.getCell((short)col);
		if (c == null) {
			c = r.createCell((short)col);
		}
		c.setCellType(type);
		return c;
	}
	public HSSFCell getCell(HSSFSheet sheet,int row, int col) {
		return getCell(sheet,row,col,HSSFCell.CELL_TYPE_STRING);
	}

That's what I have now :
getCell(sheet,gap,9).setCellValue("=YIELD(DATE("+year+";"+month+";"+day+") +
3;W"+(gap+1)+";E"+(gap+1)+"/100;G"+(gap+1)+";100;V"+(gap+1)+";1)*100");

with gap increasing and with some values everywhere ...

I'd like to have:
getCell(sheet,gap,9,HSSFCell.CELL_TYPE_FORMULA).setCellFormula("=YIELD(DATE("+year+";"+month+";"+day+")
+ 3;W"+(gap+1)+";E"+(gap+1)+"/100;G"+(gap+1)+";100;V"+(gap+1)+";1)*100");

Which is the same thing but without the need to type enter on each row of the
book ;)

I cannot specify more as it is confidential data but I think all is here !

Thank you :)

PS: If I have the time tonight I'll make a jar with an application running this
bug but you have to get some financial plugins in you'r Excel in order to read
it ... As YIELD is not a default function ...

-- 
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/


DO NOT REPLY [Bug 38358] - Unable to parse formula

Posted by bu...@apache.org.
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=38358>.
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=38358





------- Additional Comments From pitilezard@gmail.com  2006-06-07 07:06 -------
I just put an attachement in order to show my problem !

regards

-- 
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/


DO NOT REPLY [Bug 38358] - Unable to parse formula

Posted by bu...@apache.org.
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=38358>.
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=38358





------- Additional Comments From pitilezard@gmail.com  2006-06-07 07:05 -------
Created an attachment (id=18416)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18416&action=view)
A piece of process that produce an error

Howto:
* new folder
* put testPOI.jar and poi.jar (version 2.5.1-final-20040804)
* new empty excel file named test.xls
* java -classpath testPOI.jar:poi.jar com.tests.Main

file outputed is result.xls which should contain a formula with YIELD in the
first sheet column K.

Thank you in advance ;)

-- 
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/


DO NOT REPLY [Bug 38358] - Unable to parse formula

Posted by bu...@apache.org.
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=38358>.
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=38358





------- Additional Comments From jheight@apache.org  2006-01-24 03:36 -------
Can you provide this example of the problem as a small java application and
attach it to this bug. Dont forget to include any excel files that this
application uses to exhbit the problem.

Thanks

Jason

-- 
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/