Error in Read range: "Read Range: The workbook does not exist"

Hey there,

I am getting below error while running a sequence even though the file path is mentioned correctly:

Error in Read range: “Read Range: The workbook does not exist”

Can someone please help me resolving this?

Thanks in advance !

Hi @ayushi_jain3

Can you please check with the sheet name? whether it’s entered correctly or not?

Are there any trailing or leading spaces in the sheet name?

Sheet name is correct , but the problem is with file name. It changes everytime I run a certain report and save it in the folder.

Hi @ayushi_jain3

If the file is not exist in the local machine. Then UiPath throw the error “Workbook does not exist”.
If the filename is changing you have to give the exact file name in the read range workbook activity to read the data in the excel file.

Hope it helps!!

Hii @ayushi_jain3

If you have only one excel file in folder then you can use this syntax in read range activity:
Directory.getfiles(“enter youfolder path”,“*.xlsx”)(0)

This will read your excel file even if file name is changing.

If you’re going to do it that way you need to define the sort order so you get the file you want - ie the latest file, oldest file, first file by name sort, etc.

Hi @ayushi_jain3

Double-check the file path you provided in the Read Range activity. Ensure that it includes the correct directory structure, file name, and file extension (.xlsx, .xls, etc.). Pay attention to any spaces or special characters in the file path, as they need to be correctly represented.

Thanks!!