How to write new data in the same cell

How you are doing ?
im stuck in piece of logic
Can you all please help----
image
lets say from the above data table
we loop through & process each row
& then after processing i need to save the all the output in single cell of a excel(Kind of like a summary report)

example- aftr processing a,b,c,d…
i need to write like this= a succesfull,b successfull,c failed, d successfull (like this)
in a single cell of a excel

Please help me guyz

Thanks

HI @Jiban_Stars

Can you Show the sample output too?

Regards
Gokul

Ya sure
here it is
image

output string can be any thing,but my pupose is
after completion of a loop it should write the output string the same excel cell as previous
& the oupput string should be written with a “,” in between (as shown in picture)

Thanks

Okay So follow these steps

  • Outside your for each Use a Build datatable and it should with the only one column and dont change the column name and store in “TempDt” Var
    image

  • Now in the for each in which you are actually processing

    • Inside for each After the last step of the process Use Add Data row activity and set datatable as “TempDt” and start adding the status for all the rows
  • Outside the for each use assign a string “StatusVar” = String.join(“,”,dt.DefaultView.ToTable(False, “Column1”).AsEnumerable().Select(Function (a) a(0).ToString).ToArray())

  • Now use Write cell and write in the cell you needed

Here is sample Screenshots

image

Regards
Gokul

1 Like

thats a brilliant idea,
but im just unaware of linQ
So do you mind giving me any alternative expressions using VB or so for appending all the column data ??
Thanks