Complex Stuff 21

Hi Team,

Business Case-

working on a project were i used a for each loop and get row item that would take the column A value from the datatable.
Now I have to save the filename with column B row value but its not taking that value instead it typing rowitem as filename not sure why…?

1 Like

Good morning Jimmy,

Can you please post a screenshot of the formula you’re using to get the Column B value?


I am using get row item 2, 3 times in the same For each loop

Are you using For Each or For Each Row?

For Each Row may make it much easier to get the values you’re looking for.

I am using For each row

Okay perfect,

You should be able to get the value using row(“columnName/columnNumber”) (may need a .ToString at the end).


With the above formula, you won’t need to use “Get Row Item”.

You can just put the row(“Invoice”) directly in the textbox of the Type Into activity.

working…but its not naming the file with the column B instead its picking the value of column A not sure…why?image

I believe you’re specifying the first column in the screenshot. Please try 0 instead of 1 :

working…one more help if you can

Once the file is renamed( For instance " 123.xlsx") I have to copy the text data (“123.txt”) to “123”.xlsx" but its not working…
Do i have to take read range activity to process this…??

Do I have to set value for Datatable again…as It is already set to DT at the starting of Excel application scope .

Hi @jimmy_jos1

It looks like you should change to column name here:

This will allow you to fetch the element from a different column.

The solution provided by @chenderson is also valid, but it is when you would want to use an Assign activity like that:
yourVariableColumn1 = row("columnName1")
yourVariableColumn2 = row("columnName2")

As a side note - please do read through our posting guidelines here:

Please do not call all your topics Complex case X. Each topic should have a clear (and short) description of the issue in the title, as well as a more detailed description in the body of the post.