Issue with the formula being written to excel cell?

Hi all, I currently am trying to link a cell in one excel sheet to a cell in another excel file. I tried using this; “=‘C:\Users\Name\Documents\UiPath\Save Report Excel and Rename it\Monthly Reports[Monthly Report - " + CurrentYear + “(3rd Day)group” + FullMonth + ".xlsx] PL Old_detail’!AS7” however it shows an error when I try to run it. Does anyone know what I’m doing wrong?

Hi @Lochagos

can you give a try with the following?

"='C:\Users\Name\Documents\UiPath\Save Report Excel and Rename it\Monthly Reports\[Monthly Report - '" + CurrentYear + "'(3rd Day)group'" + FullMonth + "'.xlsx] PL Old_detail'!AS7"

Regards

HI @Lochagos

It Seem like file path that is not valid. You can try the following:

  1. Check if the file path is correct and if the file exists in the specified location.
  2. Check if there are any special characters in the file path that might be causing issues.
  3. Try using a relative file path instead of an absolute file path.

Regards
Gokul

Hi, I’m afraid that it didn’t work. It still returns an error when I try to run it.

@Lochagos

Looks like the issue is with the constructed formula…

Ideally this the structure needed

Single quote (‘)Path Square brackets() inside it filename and extension and then the sheetname outside and single quote end(’) and then exclamation and then the range

Eg: "='C:\Username\[Filename.xlsx]Sheet1'!A2:A5"

Try printing the value and check after including variable values if the structure is proper and then use the same

cheers