Working on one of the Project where adding data to row

where i am building a datatable (Col1 & Col2) after that in for each adding item to collection with 2 different list but finally when i am adding the data to row {old file name , new file name} eventually writing to excel file with write range activity

Issue facing - bot writing the output in column1 only instead of writing column 2 also refer the screenshot below :
image

Any solution on this , Thanks in advance !! cheers…

Hi @mittal.abhishek

Could you please share your screenshot or code of for each loop.

Hi @mittal.abhishek

Please Share the code.

WS_FTP_PRO_SharedDraft.xaml (300.3 KB)

PFB :
WS_FTP_PRO_SharedDraft.xaml (300.3 KB)

Hi
Can you share the directory of the project?
Packages are missing and we are unable to open the xaml.

project.json (1.5 KB)

1 Like

Hello @mittal.abhishek

You are writing both the values on a same Index (0), try changing it.

Please find the image for your ref, I’ve added Empty String for Previous File name in List2 and Empty String for NewFileName in List1


image

try like this and let us know

Hey It’s writing on 2 column but starting from B10 cell like below

It should write from B2 column

image

Hi @mittal.abhishek

Please replace the Add Data Row activity in second for each with Assign activity like below.

Create an Index variable in second For Each activity property like below

image

Note:
Add Data Row activity always add value at the end.
To update the value in existing row we need to use assign activity.

OutputDt.Rows(indx)(1)

(Indx) variable represents the row position
(1) Represent column position

Thanks
John

1 Like

Thanks John Perfect finally got the output as expected…

Cheers !!

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