Write cell for each


i have problem with write cell i use get text variable in write cell and i use for each row but it write same cell…

Hi @AalpeA,

The thing is that you have to provide a dynamic range to the write cell to write in the next cell.
Steps to follow :

  1. Declare a variable as count
  2. Initialize it with the value 1
  3. In the for each loop increase the value of the count variable by 1 using assign activity.
    in the assign activity : count = count + 1
  4. Then in the write range activity, give the range as “A”+count.tostring

Then, it will automatically write in the next cell


so better for understand.
I cant declare variable as count because i use

Excel scope - for eachrow - write row - get text - writ cell number that i get from text - and again.

Are you passing the cell number to the write cell activity which you are getting?

If possible, attach the workflow so that I will try to understand the issue



it is buged or something?

Its writing all the rows of data in the screenshot.

May be I’m not getting the question.
Can you please let me know what’s the issue?

issue is that get text activity output is not for each cellMain.xaml (42.4 KB)

@HareeshMR @Teja_L

The file is corrupted. can you please add the zip file?


MSCI2.zip (237.7 KB)

The workflow is not developed correctly. In the end, I guess you have the issue right?

  1. The write cell activity which you are using, need to be in the Excel Application Scope. Check this : https://activities.uipath.com/docs/excel-write-cell

  2. Get row item is used without the iterations

  3. You want to write a datatable into an excel, you have to give write range , but you are giving write cell which is not going to write the data

The solution i guess is ,
You want to get the row item in one excel and you want to write it in another excel. So you can use Excel application scope within another application scope.

Open Excel application scope and read the data using for each row. Inside that for each row, use another application scope to write cell value. If you want to check the value, use If activity before opening second application scope.


I want .Excel get the row item - write to sap - sap output NUMBER - and this NUMBER write to column K to excel but this NUMBER is not working as for each row and it write same cell K1 i want to write K1 again proces and write K2 again proces and write K3

Its just a simple thing then,

  1. Declare a variable as count and Initialize value = 1
  2. Then before the write cell activity, use assign activity to increment the value by 1
    As : count = count + 1
  3. In the write cell activity, give the range as :
    "K" + count.tostring

It will automatically increase the cell value and write your value to the next cell

It not work or i m idiot…coount

KS is output from sap

Leave KS as it is the data you want to write in a cell.

Go for new variable… Declare a new variable and do the stuff

first Print and check the ks value is incrementing or not.

@AalpeA… Please let me know if it is working


I working on this :smiley: