Fetching all data in specific column of csv file

how to fetch all data in specific column of csv file

Hi @abhay,

As I read the documentation of Read CSV(it is an activity which you can read the data from csv file) . There is
no provision to specify the Range of cell.

image

Below I have attached the documentation links .

https://activities.uipath.com/docs/read-csv-file
https://www.uipath.com/kb-articles/how-to-read-data-from-a-csv-file

Note :

But you have an option that can save the csv file as Excel file (Manually or by RPA) . Use the Read Range .In the Range property , you can able specify the column only like below.

image

Regards
Balamurugan.S

Hi @abhay

1.Read the CSV file and store it in a datatable
2.Loop the datatable using for each row
3.Inside for each use the get row item to get the particular column value

Regards
JothyPrasanth M

@abhay Read csv and store output in DataTable variable.

Then use the following command to get values of required column.

(From row in dt.AsEnumerable() select row("Column Name")).ToArray()

thanks @balupad14 read range activity is only for .xls not for .csv

Hi @abhay,

Have seen what i have written above the image ?

Regards
Balamurugan.S

okay… thanks let me try @balupad14

@Manjuts90

Capture

it gives me error please help me to solve this

@abhay Use that statement in right side of Assign activity and on left side using array variable.

That statement generates array as output not string, so u can’t display array using message box or writeline activity.

@Manjuts90 now this

Can you change the readcell Variable Type to DataRow.

Regards
Balamurugna.S

@abhay change variable type from string array to object array.

thanks @Manjuts90 its working properly

@abhay ur welcome