Write to cell of csv file

Hi,

I have a csv file with a list of industries

  • Finance
  • Food
  • Health

When the process runs an outcome is assigned for each industry like - Missing transaction, order number incorrect, Business ceased…

I’m having trouble writing the outcome to the same csv. The outcome updates all rows.

What did I miss? TIA

HI @j8zel

If filepath is a variable you created?

if yes remove the double quotes

Check whether the result variable is created ? if created check on the scope and variable type

Regards
Sdharsan

I forgot to mention the file path is just an example.

Hi

If you have all these data in a datatable then we can use APPEND CSV activity to append it to the last row of the existing data

https://docs.uipath.com/activities/docs/append-csv-file

Cheers @j8zel

Thanks for replying. I want to use the same csv file.

  • csv file consists of 50 names
  • 5 Columns
  • The automation will process each name

Columns

  • Name
  • Date
  • Email Address
  • Phone Number
  • Outcome

RPA - Loop
For each name

  1. Process
  2. Assign an Outcome
  3. Write Outcome to column 4 of csv file on the same row as Name
  4. End Process

I hope this makes sense.

TIA

Don’t think of it as writing individual values back to the CSV.

What you need to do is read the CSV into a datatable. Manipulate your data in the datatable. Then write the entire datatable back to the CSV (thus overwriting the CSV with the new data).

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.