Excel - Write cell formula error

Hello everyone,

A few weeks ago ago I was having trouble with a write cell / concatenate problem. The problem was solved HERE, however my formula has since broken.

I did notice that the second half of the formula is green, am I over looking something simple here?

Error message:

Write Cell: The write operation failed, because one of the following reasons:
► The data you want to write “=CONCATENATE(“E”&TEXT(G2,“mmddyy”)&”-‘’&TEXT(H2,“mmddyy’')&” “&Q2&” “&“P”&F2&” “&P2)” has a wrong format;
► Excel is busy or you are currently editing a cell;
► If your data is a formula, make sure you use comma as parameters separator;
► During the write operation make sure no dialog windows are opened.

Hi @MF.RPA ,

You did mention the Solution provided in the Post worked for your case. Is it not working now because of a change in the data that you are using ?

Could you maybe let us know what would be the formula you use in the Excel directly ? And check if the Formula works when tried in the Excel sheet manually.

Pretty sure the green text in Expression Editor means you have your quotation marks incorrect.

I think the issue is related to missing quotes.

Hi!

Seems that you are having some problems with quotations marks.

You can try put this formula inside a txt file, asset or a storage bucket, writing it like you are writing on the excel and then reading the file/asset/storage bucket file and puting it inside a String variable and writing this new StringVariable inside the cell.

Hello everyone,

The formula is now fixed however I am still receiving the same errors.

Correct formula:
“=CONCATENATE(”“E”“&TEXT(G2,”“mmddyy”“)&”“-‘’&TEXT(H2,”“mmddyy”“)&”" “”&Q2&“” “”&““P””&F2&“” “”&P2)"

Correct formula with commas:
“=CONCATENATE(”“E”“,TEXT(G2,”“mmddyy”“),”“-‘’,TEXT(H2,”“mmddyy”“),”" “”,Q2,“” “”,““P””,F2,“” “”,P2)"

I have been testing this but have not yet found a solution.

Can you provide me a simple row with these values and show me how you want that data to be displayed, please?

Here is an example.


Excel Example.xlsx (8.5 KB)

This formula isn’t working for me, can you try to change the approach?
Here a txt file with your formula
formula.txt (83 Bytes)

Read the Formula.txt, store it in a String Variable and then pass this variable inside the Write Cell Activity

This is my output

If you want to use the formula inside your uipath, I made some adjustments so just download this txt and copy the formula
FormulaInsideUiPath.txt (101 Bytes)

1 Like

Hello,

Thank you for providing two potential solutions.

Both solutions seem to work!

1 Like

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