Iterating each data set and write it in excel (row by row)

Capture

Hi im iterating a dataset which contains a specific data in each iteration and i want to write each data set in excel file but when i try this only the last iterated dataset is returned in excel. any suggestion on how to do this.

In the below excel i want to write the data in next row but i always returning only the last row
Capture1

Hi @MLT,

You are rewriting the same excel with the different data tables. That’s why, after the iteration, you are able to see the last data table value.

Try giving different sheet names for each data table or use append range activity instead of write range.

1 Like

HI you dont need to iterate, just try writing the data table using write range inside Excel scope should help.

@MLT

Instead of looping and writing line by line, Check as below

https://forum.uipath.com/t/tutorial-how-to-check-a-string-is-present-in-excel-sheet-part-1/243696/2

Hope this helps you

Follow Click

Thanks

that you write on row A1, the logic is that every loop will overwrite on row A1

Hi, Thanks then how to increment the cell ?

do you know the number of cells you will write?
if you know that.
simple way
-application scope excel
-read range
-for each
-write range

@MLT You can also try Implementing it in this way :

Set a Index Variable in the For Each
image

1 Like

example
Coralasi.xaml (8.8 KB)

Please find my overflow I’m just taking a folder which contains more than one PDF and extract data from each one of them using document understanding concept and writing each extracted data in a same excel file but still its over writing

DataExtractionTemplate - Copy.zip (3.8 MB) , i could not understand what is the issue.

@MLT Did you try the method that I had posted above in Screenshot and checked the output :sweat_smile:

I tried the same by modifying the workflow that you had given.And all the extracted Information was appearing in a row wise manner.

@MLT Check the Workflow :

I have modified it a bit and I guess that’s the way you needed the output to appear. Let me know if it is not the actual requirement.

DataExtractionTemplate - Copy.zip (625.7 KB)

hi @supermanPunch thanks for the help it works

1 Like

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