CSV Automation

csv
activities

#1

I want to perform an automation in a csv file .
The process involves
1.Reading a CSV file from a shared location.
2.The csv file has a column that contains date .I want to filter the data table that is obtained by reading the CSV file in such a manner that all the records that have a date <31/12/1969 are filtered out.

I am trying this using the select method but it is not working
,The syntax for the select method is
datatable.Select("[column4] > ‘31/12/1969’")


#2

InsertingColumnsToExistingFile(Autosaved).xaml (11.0 KB)
this is what i have tried


#3

Refer this Xaml File…
csv Filter.xaml (12.0 KB)
This is the example for read the csv file and Filter based on column name…

Regards,
Poovarasan Guna.


#4

the file is a csv file


#5

Yes my above Xaml file can Read the csv file only…
Try…


#6

i want to have it specifacally for a column that has date. it is not able to compare date


#7

Refer this…

InsertingColumnsToExistingFile(Autosaved).xaml (14.3 KB)

Check whether ur csv file date and EltoWeekly.Select("[Column4] > ‘31/12/1969’") are in same format or not…
In the Above Xaml File, i can just create a variable in array of String and define some date in the list…
And Use some filter operation in That…
It will filter the date.

Try this…


#8

31/12/1965 is the format in the csv file .


#9


Check This file…I made something…

In My Machine, Date comparison will work…!!!
Try these type of flow in your machine and Implement into your csv file also…


#10

Sorry @mudit
My above file can check only the date,It will not check the month and Year…
Whether u can join your date like this…"31121969"
Split your date by using “/” and join the date… and Then check…
I think,It will work…


#11

i suggest you create a csv file at your end . Insert dummy data for example name,addreess,dateofbirth ,city
.Insert certain dates then try to read the csv file and filter the data table .Please if you can help with this then it would be very useful


#12

Hi @mudit,
Try this…
InsertingColumnsToExistingFile(Autosaved).xaml (14.3 KB)
Input
Capture

Condition
userDate=1/1/2000 in the format of MM/DD/YYYY
userDate<csvFileDate

Output
Capture


#13

is there a limit that a data table can only process certain number of records ?


#14

@mudit I think the limit is 1 million rows.


#15

Hi if the date format is of dd/mm//yyyy. Then how are we goin to process it ?


#16

The maximum number of rows that a DataTable can store is 16,777,216


#17

I think, the checking date is given by you…You can written in MM/DD/YYYY format…

And the csv File Date is like dd/mm/yyy, u can change to this format by using split function…


#18

Here is the csv file that ia m talking about.Is it possible to filter the records when we have a formatting like this ?


#19

Can you Explain in Detail…


#20

this is the csv file i am talking about. I have to filter this csv file in on the column Exposure To (that contains date) in such a way all records with EXposure To Date as 31/12/1969 or earlier are filtered.So that we remain with only those records where the Exposure To date is greater than 31/12/1969