Data is not writing to each excel cell - What am I over looking?

Hi everyone,

I feel like I am overlooking something here and I just can’t pinpoint the error. I am trying to obtain messages from a screen and write them to each row within an excel workbook. I seem to only be able to write data to cell T2 and I do not continue down the list for each row. I constantly overwrite data to cell T2. I tried using another for each row activity and was not successful.

my excel write cell expression is “T”+2.toString

image

Thank you,

Not clear on the activity but I assume you can try to use write range activity instead of write cell. Write range will help you write data starting from a specified cell.

It looks like my arrow and text did not save in the image provided. My screen scrape and write cell activities are within the Body contained within the for each row activity. I will try the write range activity and report back with my results.

Hi @MF.RPA ,

Write “T”+(DTTable.Rows.IndexOf(row)+1).tostring in write cell activity instead of “T”+2.toString

We are close here, the expression suggested starts writting values at T1 and not T2. Should the +1 be moved to the front of the expression?

@MF.RPA - For Each row comes with a default Counter …You can declare it say Idx. Idx is integer type variable.

Since this variable starts with 0, in the write cell just mention as “F” + (idx+2).tostring…

Please find the sample below(for similar for each used to write the file name in the excel by incrementing the row for each time)

1 Like

try “T”+(DTTable.Rows.IndexOf(row)+2).tostring

1 Like

Hi Prasath17, I actually tried your solution the first time around and received the same results. I appreciate the suggestion. I should have mentioned this in the initial post.

This was the solution.

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