I have a problem that I want to check data line by line in datatable.
For example dtname(1)(0).ToString = dtname(0)(0).ToString and I check the condition in for each loop.
When the robot runs,it says null reference exception and stop.But when I output with log message,the data comes out.
If anyone has a thought,please give me an advice.
I’m sorry if my english words are not well.
Aung Kyaw Zin
Welcome back to UiPath community buddy
Kindly use for each row loop to iterate through the datatable named out_dt
Moreover before using for each row loop, once after getting the datatable from the excel with read range activity, use a assign activity like this
row_1_value = dt.Rows(1)(0).ToString
Then inside the for each row loop pass the input to loop with variable out_dt
inside the loop use a if condition like
if the condition gets passed go with then part of activities or go with else part of activities
Thats all buddy you are all done…the reason why you get this error the variable that you have used is with null value thats why
Hope this would help you
Great buddy, kind let whether this works for you are not @Aung_kyaw_zin
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.