Write cell in csv

Hi @Palaniyappan

I have to write cell after getting count i.e after 338

but I am getting below error there is no row at position 3 i.e next to 338

I have also tried add a row but it’s not working.

1 Like

@prashantP

Replace Assign activity with Add DataRow activity and pass value you want to add it to the DataTable.

Hello @lakshman

I am not getting you. will u pls explore?

@prashantP

You want to add some text after 338 right ?

Hi

Hope the below steps would help you resolve this

  1. Let’s take like you have a datatable read from csv named dt

  2. We don’t need to get the count rather we can directly use add Datarow activity like this

In ArrayRow = {“Text Ex”}
In datatable mention as dt

  1. Now your datatable will be added with a new row atlast to the existing one with the above text

  2. Then use WRITE CSV file activity

As simple as that

Cheers @prashantP

Hi @Palaniyappan

Yes. this way it’s working as expected.

but I forgot to mention that there is a string variable instead of {“Text Ex”}. so ArrayRow is object type.

so what to do next?

@lakshman

Yes. that’s right.!

In that case
Mention like this in ArrayRow
{variablename.ToString}

Cheers @prashantP

thanks @Palaniyappan and @lakshman

Glad
Happy automation @prashantP

1 Like

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