Do While that stops if the cell is empty

Hi!

I need to read and copy cell A1, and after that read and copy cell B1, A2 and B2, and forward. But every time that I extract the file, the number of lines change, sometimes is 3 lines, and others 30. I’ve tried Read Cell actvity and on the cell field “A”+counter (a counter that checks if the cell is empty, if not, add 1 more unity)

This activity ends when the cell of the column A is empty…

Some help?

1 Like

Giulia,

Why don’t you read the full datatable?

Otherwise, can I see your Do While condition??

Thanks,

Kind regards,
Daniel

Hi, Daniel!

I’m using a Read Range activity, and putting in a DataTable variable. What I’m having issues is: the quantity of lines are always changing, every time I download the document, and I need to copy the cell, paste, and after that copy the beside cell and paste. I have to do a Do While, but look what I’ve tried

DTCaixas.xaml (9.1 KB)

Thanks!

The process stops because you have a Break Activity, if you use a Log Message you will be able to how many empty rows you have and it won’t stop.

What I would do is read the full table, modify the fields and paste it back on another excel.

Thanks.

Kind regards,
Daniel

But the process stops before the break activity, there a lot of gaps on my file 'cause I’m trying a lot of things.

Thanks!

Please tell me where it stops, so I can help you.

Why are you reading only columns A and B?

Thank you.

Kind regards,
Daniel

You havent increment the counter

What is your main requirement?

If you are looping them by using For Each Row
Then u can save them directly
say by using
Row(0).ToString in Set to clipboard for A1 FOR loop 1
Row(1).ToString in Set to clipboard for B1 FOR loop 1

Hi @Giulia_G,

I have seen in your workflow that you are using Break activity when condition is True, that is why stops. You shoud use Continue activity. This one finishes the execution of the current row and continue with the next one.