Hello, Need support for for each row and read range activity

hello, I am working on an automation to check every cell in a column in excel file if the digits less than 51 move the file to another folder. but when i used the read rand and save the value inside a variable and use it into for each row i get this error. your support is highly appreciated.
Main.xaml (19.1 KB)

Hi @mohamed.saty2012

Instead of For Each Excel Row use For Each Row in DataTable and pass the same if condition using if activity. It will solve the error.

Otherwise you need to use For Each Excel Row inside Use Excel file and you need to pass in below way

Excel.Sheet("Sheet1")

Regards,

i did as you suggested the error has been fixed. but i have got another one as shown.
Main.xaml (15.8 KB)

@mohamed.saty2012

Can you tell what is the exact condition you are checking as per that I will update the given workflow by you and upload.

Regards,

i need the robot to check all excel files in folder and see if the value in the cell contains less than 51 digit move the file to another folder if not leave it as it is. the column name is
“GL Full Account No. ( Should be Full Segemment )” here is the excel file.

222.xlsx (139.9 KB)

"

Hi @mohamed.saty2012

Check out this workflow file. The errors have been solved.

Main (1).xaml (17.1 KB)

Hope it helps!!

Hi,

Can you try ForEachRowInDataTable instead of ForEachExcelRow as the following?

image

Regards.

the automation woks correctly and move the file to the correct location but at the end this error appeared

@mohamed.saty2012

Make sure you have ECC-GLV2 folder created and inside that Check on Digits folder created.

Then try running the process.

Main (1).xaml (17.1 KB)

Regards,

all is created as i mentioned before the automation runs fine the file moved from ECC-GLv2 folder to the Check on digit folder. but even thou the error appeared.

@mohamed.saty2012

Check out this zip file and run the process .

TestWirkflow.zip (148.6 KB)

It’s working fine at my end

Regards,

i don’t think this is correct. maybe i can gives you Anydesk access so you can see exactly what is happening exactly. if it is no much trouble

Hi @mohamed.saty2012

If possible share the zip file of yours. I will look into it.

Regards

Check on Digits.zip (628.2 KB)
here you go. this automation checks only the first file regardless of any other file in the folder. also move the first file and ignore the others. also, you will find 3 files in ECC-GL folder 2 have the problem that we need to move them for, and one is normal. thanks, aging for your support and time I am really appreciate it.

please, take in your consideration that maybe only one cell will have less than 51 digit and all other cells in the GL raw is correct. this is why i need to check on the entire row to make sure that Thay all have 51 digit.

@mohamed.saty2012

Try using Copy file instead of Move file.

Regards

copy will not help. i need to separate the faulty files from the correct ones. to continue to the next step. if the corrupted files keep at the same folder the rest of the automation will not work

Hi @mohamed.saty2012

Try this:

TestWirkflow.zip (885.4 KB)

Hope it helps!!