Using variable in file name in Open Spreadsheet

Hello friends, I need to open an Excel spreadsheet but its name is variable depending on the date it was generated. The Excel spreadsheet was developed with RPAe from a web page and there I managed to capture the name of the file in the clipboard and save it in a variable “file_name”.

The problem is that RPAe does not allow me to do this: :confused:

Open Spreadsheet (“C:\ Data**${file_name}**”)

I attach a photo.



Hi @asterizko

What is the value of the ${file_name}?
Does it contain the file extension (it should be .xls or .xlsx)?

1 Like

Hello @ashapkina

The file extension is .XLS
This is a real name: Cases_ (08-08-2018_00.02.38 hrs).xls
To test I saved it inside a variable String.

In other text boxes of other RPAe functions when writing $ {… I get the names of the variables. In this control nothing appears to me, as if it does not accept variables.


I just tested it with this name, and it worked.

The autocomplete is not supported in this field, but you can still use variables instead of plain text.

Does it show any error when you run it?

1 Like

Hi @asterizko, did you manage to use a variable in the file name?

1 Like

Hello @ashapkina did not work immediately, I kept showing error, but when I left the instruction alone if it worked, then I was activating the other actions and ran well. I think that something internally may have been dirty and by deactivating everything and leaving only the Open Spreadsheet action, something was fixed. Thank you very much! :star:

1 Like