Auto increment rows issue

I’m using Excel Process scope and using the “for each excel row” activity to view data in a particular column. i’m comparing that value to another value in a separate data table with logic like this:

if valuefromExcel = valueFromDataTable, then take the other info in the datatable needed and add it to the Current Row in the excel file using the “Write Cell” activity starting from a certain position and then i’m using the auto increment option to fill in the corresponding rows. The issue is, when i come across an instance when valuefromExcel never equals valueFromDataTable therefore, throwing off my placement of the correct values in the excel file due to the auto increment function.

My question is this. Is there a way (or an activity) in the “else” part of the conditional statement that i can skip over that Current row in excel and continue the “for each” loop maintaining the correct placement of values using the auto increment function ?

@chris.dease

Auto increment works only when that particular activity is executed as you are using if it is causing a problem

I stead use currentrow directly to write the value…as I believe you would be writing the vaue in the same row

Also…for loop has a index proprty you can use that as well if you need

Cheers

I’m not understanding. Should i write something different here to represent CurrentRow? if so, what should i write?
image

i tried CurrentRow(ColumnTitle) but receive error doing that.

I figured out the solution. I was using “for each excel row” which created the variable “CurrentRow,” but also using a “for each data table row” nested inside the “for each excel row” causing another “CurrentRow” variable to be created which is why i couldn’t use the “CurrentRow(ColumnTitle).” i change the variable in the for each datatable row to “Row” instead of “CurrentRow” and it resolved the issue so i’m now able to type into the current row.

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