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 38358] - Unable to parse formula
Date Thu, 02 Feb 2006 13:03:56 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=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/


Mime
View raw message