I would like to know if there is some way to fill an excel from a last modified record so as not to lose the traceability of the file, that is, the file has registered data, the idea is to continue filling the file without deleting what it already had.
There are many ways to do this. One simple way is to use the X,Y positions. X being the row index, Y being either rowindex or column name.
Example: If you wanted to updated 2,2 (2–>B) i.e. fase 2 which is empty
Step 1. Read you excel file and save the output datatable (read with Headers). —>(YourDataTable)
Step 2. Use an Assign activity in UiPath in the key use YourDataTable.Rows(0).Item("fase2") = "x"
This will update the 2—>B to “x” but only in the YourDataTable
Step 3. Would be to write back to the excel your reading or make another output file (recommended) and use the Write Range activity in UiPath. Give a filename in the Write Range
There are two Right Range activities, you can choose the one which is tagged Read Range – Workbook
Above we performed everything in a static manner, if you have multiple rows, you can use the For Each Row activity.
In the For Each row activity go to properties and make an index variable. This tells you in which row you are when looping.
For each row in YourDataTable
Repeat Step 2 from above but now you can use
Assign —> YourDataTable.Rows(IndexVariable).Item("fase2") = "YouRequiredString"
So in short in row number 25 your formula at runtime will be YourDataTable.Rows(25).Item("fase2")
Outside the For each row perform Step 3 from above.