I’m struggling with the syntaxes to add a formula in excel via the activity “write line”.
the formula looks like this: IF(FM2<>“”,FM2,IF(DC2<>“”,DC2,AS2)
How do I get tis right in UIPath? Because the “” is also UIPath language. Do i need to add single ’ somewhere?
Thanks for your reply.
First of all, sorry for my mistake - I am obviously using write cell and not write line.
I get an error while running it now: 'the range does not exist" - and I’m not sure if it is because my formula in the ‘value’ field of the write cell activity is wrong. Everything else seems to be fine…
It’s a little more complex then i first told, because I also have a variable nested in it (the variable is intRow which I convert to string).I don’t know what I am doing wrong, must be something with the double quotes or +.
This is the code I have entered:
I started with an excel application scope and reading the range, storing the output as dt.
Any idea what could be the issue?
Before proceeding further, I noticed that your formula is missing a parenthesis at the end “)” (I typed it into Excel and it automatically corrected this: =IF(FM2<>"";FM2;IF(DC2<>"";DC2;AS2)
to this: =IF(FM2<>"";FM2;IF(DC2<>"";DC2;AS2))
First thought then would be that the formula is not accepted by the Excel, which in turn throws an exception and that Excel exception is then propagated as an error in UiPath.
Your formula here has same issue, you never close the first IF statement: