Not able to write data in csv

excel
uiautomation
csv
activities
studio

#1

Hi

I have a data that is getting printed correctly using “write line” activity. However, instead of write line, I wish to write the result in CSV sheet but I am getting an error. Can anyone please have a look and tell how to do it

Main.xaml (11.4 KB)


#2

Use Write Cell Activity. This activity accepts string values.
If you have a data table, then only you can use write CSV activity.


#3

Can you please tell me where I should use write cell activity? I tried using it, but still it is not working


#4

Just after the writeline activity.


#5

k so I tried, but now only last entry is getting saved in the sheet, can you plz help me with it


#6

Hi samya,

Please send your sample file and workflow.

Regards,
Hoang Anh.


#7

Keep that inside loop else it will save the last value from the loop.


#8

Hi,

Just wanted to point out that CSV is also a text file so you have a string where you append your results to, then you can use Write Text file using an the extension as .CSV

That’s just another option than dealing with tables if you prefer.

Here is a version using the string.
Main (5).xaml (11.8 KB)


#9

I have placed it inside the loop but still I am getting 1 value only. I think that as I have defined the cell in write cell activity it is overwriting the previous values and saving only the last one, can you plz give any suggestion for it

Main.xaml (12.8 KB)


#10

I tried doing it but it is not giving the desired result


#11

Here are the latest files

Main.xaml (12.8 KB)
sample.xlsx (9.8 KB)


#12

Finally it is working now, Here is the final file, if anyone in future needs it

Main.xaml (13.2 KB)