Add data to column

Hi!
I have an excel file to which I do a filtering process and I need after filtering this data to mark me as processed in a cell that I have empty.
How can I do this process?

Attached image

Thanks

You have multiple options for that. I’m giving you one example, hope that would help!

  1. Read whole file and clear the datatable and treat it as log datatable
  2. Process your task(what you are doing right now)
  3. Once loop is about to end just add “add data row” in log datatable will all the values you have
  4. For each will repeat all these automatically
  5. Write log datatable in an Excel, you’ll have your column updated
1 Like

Do you have an example that you can help me with? I already tried add data row and it doesn’t work.
Thanks

@Beatriz_Eugenia_Duqu Can you tell us what is the Processing Part that you have performed till now?

1 Like

Hope this might help!

1 Like

@Beatriz_Eugenia_Duqu Actually you can just use row(“Procesado”) = “Processed” using an Assign Statement to update that particular row which has been processed.

1 Like

I already did this process but it doesn’t work for me
Thanks

@Beatriz_Eugenia_Duqu What error do you get ?

1 Like

nothing just doesn’t put the processed value in the processed column,
it is empty

@Beatriz_Eugenia_Duqu

Try to use this .

row("Concepto").tostring.trim.toupper.equals("IVA CUOTA MANEJO CUPO ROTATIVO")

and is you else case use this in writeline "

"Not Found for row -->" +dtBanco2.rows.indexof(row)

1 Like

@Beatriz_Eugenia_Duqu I think the value “IVA CUOTA MANEJO CUPO ROTATIVO” is not present in your excel file :sweat_smile:

In the else part of the If Condition put row(“Procesado”) = “Not Processed”

If it updates the file with Not Processed that means it can update the datatable properly , and the problem might be in the if condition or the data that you are using.

1 Like

@Beatriz_Eugenia_Duqu Ohh wait, I got it :sweat_smile: Are you writing the datatable back to the Excel file , using Write Range Activity ?

1 Like

I don’t clearly understand the question

@Beatriz_Eugenia_Duqu Use Write Range Activity After the For Each Loop and use the dtBanco2 as the input to the Excel file.

1 Like

I don’t know if I’m using it wrong

I don’t know if I’m using it wrong

7

@Beatriz_Eugenia_Duqu

In the range value, keep it blank or just provide “A1” and make sure you check on check box which says add headers.

2 Likes

It didn’t work, but I’m not sure if it was the way I used it

Where would you put the value of processed?