<aside> 💡 Encountering errors writing the correct formula to Excel using the action “Write to Excel worksheet”? Use “Activate cell in Excel worksheet”, followed by “Send keys” to write the formula instead. Remember to insert the special key {Return} at the end.

</aside>

Problem Description

The action “Write to Excel worksheet” does not write the correct formula to Excel sometimes.

For example, the following flow results in an incorrect formula, i.e. =TEXTJOIN("",TRUE,IFERROR((MID(A1,@ROW(INDIRECT("1:"&LEN(A1))),1)*1),"")), being written to cell B1.

Untitled

Notice that an additional “@” has been added to the Excel formula. While this does not result in an error within PAD, the output in Excel is incorrect.

Untitled

Solution

As a workaround, we will first use the action “Activate cell in Excel worksheet” to activate the cell that we want to write the formula to.

Untitled

Then, we will use the action “Send keys” to write the formula to Excel. Remember to insert the special key {Return} which you can find under Insert special keys>>Misc>>Enter.

Untitled

This will allow you to achieve the desired output:

Untitled

Additional Information