Fetching all data in specific column of csv file

csv
uipath

#1

how to fetch all data in specific column of csv file


#2

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 .


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


#3

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


#4

@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()

#5

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


#6

Hi @abhay,

Have seen what i have written above the image ?

Regards
Balamurugan.S


#7

okay… thanks let me try @balupad14


#8

@Manjuts90

Capture

it gives me error please help me to solve this


#9

@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.


#10

@Manjuts90 now this


#11

Can you change the readcell Variable Type to DataRow.

Regards
Balamurugna.S


#12

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


#13

thanks @Manjuts90 its working properly


#14

@abhay ur welcome