When filling in excel only write (overwrite) in the first line

Hello.
I have a problem when filling out an excel and it is that it always fills me on the first line (next to the header), overwriting the previous result.
My process does the following:
1.- I read a field from an excel and look for it on a website.
2.- I extract the data from the web, create a data table and add a row of data.
3.- I go through the entire excel, row = row + 1
4.- Finally I write the range.

As you can see in the capture everything is going well, only the last step of writing several lines of excel fails me.
a greeting

Are you reinitializing the datatable in the loop? If so you will always have a single row.

Hello, if I have it inside the loop, and I’m trying as you say but I can’t get it to work for me, I upload my .xaml to see if you can tell me where exactly to put it, it’s simple and short
Thank you.
Main2.xaml (23,2 KB)

Hi,

In your while loop you are restarting the TablaDatosCreada for every iteration. This implies nothing remains stored in your data table. The solution is to move that Build Data Table activity outside the while loop.

1 Like

Hello and thanks for the help, I have put it before the loop and it works for me, although the “nameless” solution was on the way and I appreciate it, yours has been more direct.
A greeting.

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