Object reference not set to an instance of an object eror

For Each Row in Data Table: Object reference not set to an instance of an object.

I’m getting this error even if I don’t define inside the foreach. First thing I need to do is pull data from excel file in string form. I want to fill the necessary places in the browser with the data I have taken. but even if i disable the foreach’s content i get this error. Do you have a problem with identification?
can you help me. I tried many things but it didn’t work.

Hi @Duygu_Ozdemir

  • In For Each Row in Data Table → Check the dt value

Can you please share the Workflow?

Regards
Gokul

1 Like

Hi @Duygu_Ozdemir

Check with the datatable count

Dt.Rows.count

If the count is greater than zero proceec with iterating the rows.

Regards

1 Like

Main.xaml (31.1 KB)

hello, i am a bit of an amateur :frowning:


I tried to do what you said. but still gave the same error

@Duygu_Ozdemir

Refer the xaml below.

Main (6).xaml (34.0 KB)

Regards

1 Like

Hi @Duygu_Ozdemir

Does the above works for you?

Regards

1 Like

hello, I tried the main file you sent, and I entered the excel url, but I still get the same error. screenshot is as follows.

@Duygu_Ozdemir

If possible can you share the file that you re using?

Does the count of the rows are greater than zero?

Regards

1 Like

sahibindenExcel.xlsx (11.4 KB)

Hi @Duygu_Ozdemir

Please refer the screen shot below.

seems the Excel has value.

Regards

1 Like

Main.xaml (18.7 KB)
can you see if it still works for you
it gives me a foreach error again

@Duygu_Ozdemir

You have chose a wrong dt varible to iterate in for each row.

Pass OutDtFOSL in for each row

Regards

1 Like

yess it worked. Where is the error in my own project, how do I fix it. I tired you a lot, but if you have time can you take a look?

Main.xaml (33.2 KB)

it happeneddd. I did. thank youu so much. :slight_smile:

Hey @Duygu_Ozdemir

Click on the Read Range in the excel application scope

and click on the Variable Pane .

Delete the Duplicated dt Variable.

Regards

1 Like

thank you so much :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.