Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Formulas with JXL...

807589Jul 16 2008 — edited Jul 16 2008
Hi, I would really appreciate a little help here. I built a really nice Excel Workbook using JXL, and the only thing that I can't manage to get to work are the formulas.

I have tested this formula in a Microsoft Excel generated xls, and it works great:
=IF(C3<>"";VLOOKUP(C3;$A$355:$B$364;2;FALSE);"")
Well, to add that formula to my workbook via jxl, I did the following thing:
cell = new Formula(0, 0, "IF(C3<>\"\";VLOOKUP(C3;$A$355:$B$364;2;FALSE);\"\")");
sheet.addCell(cell);
But that gives me the following error:
Warning:  Lexical error:   IF(C3<>"";VLOOKUP(C3;$A$355:$B$364;2;FALSE);"") at char  9 when parsing formula IF(C3<>"";VLOOKUP(C3;$A$355:$B$364;2;FALSE);"") in cell MyApplication!G3
I realized that is seems to be expecting "," instead of ";", so I put it like this:
cell = new Formula(0, 0, "IF(C3<>\"\",VLOOKUP(C3,$A$355:$B$364,2,FALSE),\"\")");
sheet.addCell(cell);
But I get this new error:
Warning:  Unrecognized function when parsing formula IF(C3<>"",VLOOKUP(C3,$A$355:$B$364,2,FALSE),"") in cell MyApplication!G3
It seems it doesn't recognize the function VLOOKUP (I isolated it to verify that). I don't understand why JXL needs to know the function! How can I force it to put the function in the XLS even if it doesn't recognize it? Or how can I force it to recognize it? Please, help meeee
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2008
Added on Jul 16 2008
1 comment
674 views