Read text file and write into CSV file


#1

I have a text file containing Name, Age, Experience, Profile each of them separated by a colon, I want to read that data and write into CSV file and I want Name, Age, Experience, and Profile is treated as a column in a new CSV file. Please, someone, help me on this or share a workflow for this.
Thanks
dummy.zip (211 Bytes)


#2

@Asmit_Anand1 try below workflow and let if u find any difficulties in that workflow. Give ur text file and excel file path in that workflow.

Seq----.xaml (12.6 KB)


#3

Thanks a lot, I will try this.


#4

Thanks again,I executed your workflow it’s working smoothly, I have one doubt in understanding the workflow can u explain me after splitting part i.e Add data column and Add to collection.


#5

@Asmit_Anand1 In every loop After splitting with respect to “:” label will come to zeroth position of array and value comes to come to 1st position of array. every time loop runs column will be created by zeroth position of array and first position will be added to collection. After for loop execution we are adding collection to datatable as row by converting collection to array.

If u have any further doubts let me.


#6

Thanks bro,got it :slight_smile:


#7

@Asmit_Anand1 welcome:smiley:


#8

I have text file containing Client Info separedted by a ‘-’, I want to read that data and write into CSV file. I tried the above workflow. this is the error I got
“System error at initialization: A column named ‘FY17206-Bradford Cleaver-Romania’ already belongs to this DataTable. at Source: Invoke workflow file: Invoke workflow file: Invoke workflow file: Invoke workflow file: Add data column” help me on this please.


#9

@script0207 can u share sample data?


#10

I tried from “https://acme-test.uipath.com” I want " Calculate Client Security " Client ID , Client Name, Client Country in a CSV file.


#11

@script0207 this thread completely different from what u asking.


#12

ClientInfo

I want to convert this text file to CSV. I tried uploading the text file but it was not supporting, sending a screen shot.
Thanks @Manjuts90 for quick response…


#13

@script0207 Try below workflow once.

Seq----.xaml (15.4 KB)

Book.xlsx (7.8 KB)

input was like below

image


#14

Thank you somuch it worked!!! I appreciate your time and Quick response.