Read Range Activity Error


getting the following error can please anyone help?

Hi @Varun_Dharni ,

It seems that column “Name” is missing from your read data table.
Perhaps the range from the Read Range activity is not properly defines.

Could you please share more details about the process?

Thank you

HI @Marius_Puscasu please let me know what all details you need, attached is the demo excel sheet I am using but whenever I am executing the code it is creating a new config file which is totally blank and hence I believe this error is coming. Robot is NOT reading the config file which I want it to read.

the one I have shared is what I want robot to read but it is not doing so.

Instead it is creating this new file everytime and trying to read I suppose.

code1 code2 Thought to share with you this as well. Hope this helps.


Hi @Varun_Dharni ,

What is the name of “the config file which I want it to read.”?
Please check that the value given in UiPath matches the value from your Excel file

Best regards,


Does “Config.xlsx” file have a sheet “Sheet1” with columns “Name”, “Value” and “Description”?

yes , but everytime I run the code it creates a new config file which is empty in nature :frowning:

@Marius_Puscasu yes , but every time I run the code it creates a new config file that is empty in nature :frowning:

@Varun_Dharni ,

It doesn’t make sense. A new file is created only when there is no such file at the specified location.
Please check again all the values provided by you within the code.

Your workflow looks right, but I’m afraid somewhere is a typo, a mismatch ( perhaps an .xls instead of .xlsx, a different full path …)

@Marius_Puscasu might be I have just cross-checked while in the excel application scope when I tried printing the config path it opened me the correct file and gave me the right path, I guess trouble lies with reading Range activity.Screenshot_1


sharing output for your reference

Hi Varun,

i recognized that you are using fixed full path/folder which may cause your problem (robot generate new excel file by Excel Application Scope if file does not exit). it’s good to use “Environment.CurrentDirectory”.

@mita29 @Marius_Puscasu thanks for your inputnew error , it is no more creating a new file. able to read the original properly but giving the following error now

@mita29 also can you please elaborate what is “Environment.CurrentDirectory”. ??

Hi Varun, please share your [Assign] statement.

For the Environment.CurrentDirectory, robot will refer to current machine environment where the project is running.

assign_statement here it is , also please let me know if the assignassign_excel

also just wanted to know the variable used in assign activity and the one used in excel sheet ( PdfFile_Path ) do they have to be of same name , I guess this is exactly where things are not working when I am trying to see the result via message box activity.


@Marius_Puscasu @mita29

i have tried to trouble shoot and this is where the problem still lies , can you please let me know if syntax I am using is the correct one in this case ?

PdfFilePath = ConfigDT.Select(“Name=‘PdfFile_Path’”)(0)(1).ToString

PdfFilePath this is a string

ConfigDT is a datatable
Name is a column Name

I am not able to print PdfFilePath via messagebox activity

Hi Varun

please try using blanket surrounding column name as “[Name]” to tell system that this is object name not system constant.