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