Lesson 9 Practice 1: Assign activity doesn't count + 1



When I assign the expression wordsDT.Rows.IndexOf(row) + 1 to the rowIndex variable, to account for Excel sheets that start their index at 1 rather than 0, the + 1 (or any other addition) is ignored.

So a match is found in row 4 when it is actually in row 5 etc.

Changing the variable type from Generic to Integer doesn’t help.

Any ideas what I might be missing?


Try converting the index to integer and then adding the 1:
CInt(wordsDT.Rows.IndexOf(row)) +1


Thanks for the quick reply!

CInt didn’t do it either.

I have inserted the Read Range activity newly, and this somehow fixed the issue.

BTW, I have observed an inconsistency when comparing my Matching process with the Sum process in Practice 2:

  • I have added a header row to my Match.xlsx. But the match results are correct only when the Read Range attribute AddHeader is set to false.

  • The Sum.xlsx does NOT have headers. The AddHeader is set to false, accordingly. The cells in clumn 3 are written in the correct rows, as I expect it.

So, how come I have to set the AddHeader attribute to false though the excel sheet has headers, in my Match process?