where dT1 = DataTable Name Rows.IndexOf(row) = Index number of the row for which we are processing the row + 2 = If you are reading the header your index will be 0 so you have to add 2 that’s why we used +2
we use rowIndex variable because we have to write the “Match” status in front of the same row for which we are processing.
It’s not like using only dt.rows.indexOf(row) you can use any counter variable like i and increase the counter one by one.
All i need was just headers to fix my problem. The solution was adding headers with ‘Write Cell’ activity and place the range at A1 and B1 (the second headername).
When thats done - i added my values with a ‘Write Cell’’ again but with A2 and B2 range.
For optimization reason: is there a BETTER way to add headers to an excel file or is it OK what i just did?
—to use a data table. Use the Build Data Table activity and set up your headers there, then to assign the values, use the Add Data Row activity using the Array property like {clientInformations, ArrayOfID(1)}. Then, when the the table is complete you can simply use Write Range to overwrite the spreadsheet with the data.
—use comma-delimitted text then use Write Text File using a .CSV extension. To get data table just use Read CSV after you are created the csv file.