Filter DataTable issue to write in text file

i have excel file and columns like–> Model,Color, price
if price is >500 i want to write in text file.
i tried but it showing error …
can anybody help…
Pendrive.xlsx (11.4 KB)

1 Like

Hi @Anand_Designer,

What do you want to write in text file?
What’s the error you are facing?


i want to write data where price >500 write to text file all columns.
i used read range > for each row > for each >if> write text file
i am getting error like below

Okay Do this,

Use For each row, If Cint(row(“Price”).ToString.Split("₹"C)(1))>500 then write to text file.

Dont use For each


Also note that you are using a for each on item as DataRow but your if you are using row

You have to change your condition in the following

1 Like

i followed your code, but it shows error in append line

You have to write a variable of type string inside the Input field in Append Line.
So for example change row to row(“Price”).ToString in order to write the price into the file

1 Like

Thanks for given solution @Pradeep_Shiv @stefano_negro,

1 Like

Happy learning!

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