Difference in output from Message Box and Excel Write Line

Hello All,

I require UiPath Studio to write a formula in excel for me and for some reason I can’t get it to work. I write the exact same text in both Message box and Excel Write Line, but I am getting different results.
The message box result: image
The excel result:

For some reason, there are double quotes showing up in the excel file compared to the message box. I need the message box output.

The main problem stems from me needing to write a formula in uipath that will be written to excel, but the double quotes are confusing me.
The formula needs to be:
=MID(IF(IFERROR(FIND(" Q",F2),0)>1,LEFT(F2,FIND(" Q",F2)-1),IF(IFERROR(FIND(".Q",F2),0)>1,LEFT(F2,FIND(".Q",F2)-1),IF(IFERROR(FIND(“Q”,F2),0)>1,LEFT(F2,FIND(“Q”,F2)-1),""))),2,30)

How do I write this as a string exactly as it is?
Thank you,

Hi @spolo

Tell me if the following will do:

Assign (String)
formula = "=MID(IF(IFERROR(FIND("" Q"",F2),0)>1,LEFT(F2,FIND("" Q"",F2)-1),IF(IFERROR(FIND("".Q"",F2),0)>1,LEFT(F2,FIND("".Q"",F2)-1),IF(IFERROR(FIND(""Q"",F2),0)>1,LEFT(F2,FIND(""Q"",F2)-1),""""))),2,30)"


Hello @msan,
This has almost worked, however it is posting to my excel with the quotations being slanted as opposed to straight. The excel sheet does not accept the slanted quotations. Any ideas in that regard?

Your original string had some slanted quotes but I cleaned them. Are you sure you don’t copy paste any part in an intermediary medium? Could you copy paste the string from your UiPath activity into a Text file (with notepad) and attach it to your next post?

You are a genius! That was exactly the issue I had, I didn’t realize that my intermediary medium was changing my quotes to slanted. Thank you for your help!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.