Removing a row from the data file after the transaction is complete

Hello everyone,

I am working on a project and want to know if there is any option which I could use to remove the row in the input file after the transaction is completed? If so, could someone lemme know how to do it in UiPath Studio X.

Hi @Muhad_Millath

You can use the below activity

Regards

Hi @Muhad_Millath

If you want to remove the every first row after transaction completed in a datatable.

- Assign -> dt = dt.AsEnumerable.Skip(1).copytodatatable

The above expression used to delete the first row in the datatable and store remaining rows in the same datatable.

Hope it helps!!

@Muhad_Millath

After performing the necessary actions for each transaction, add a Remove Data Row activity to remove the current row from the DataTable.

@Muhad_Millath

  1. Excel Read Range:

    • Use the “Excel Read Range” activity to read the input file into a DataTable.
  2. For Each Row:

    • Use the “For Each Row” activity to iterate through each row in the DataTable.
  3. If:

    • Use the “If” activity to check if the current row corresponds to a completed transaction.
  4. Remove Data Row:

    • Inside the “If” activity, use the “Remove Data Row” activity to remove the current row.
  5. Excel Write Range:

    • Use the “Excel Write Range” activity to write the updated DataTable back to the input file.

@Muhad_Millath

Welcome to the community

If you want to remove from an excel…you can use delete rows activity and give the row number you want to remove

If you dont know the row number you can use a filter activity first and filter the excel with a value from a unique values column and then use delete rows and select visible rows so that the filtered row is deleted

Hope this helps

Cheers