# CSV Automation

**URL:** <https://forum.uipath.com/t/csv-automation/11664>\
**Category:** Help\
**Tags:** csv, excel, system, activities\
**Created:** [13.Сентябрь.2017 12:20:45 UTC](https://forum.uipath.com/t/csv-automation/11664 "2017-09-13T12:20:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [13.Сентябрь.2017 12:20:45 UTC](https://forum.uipath.com/t/csv-automation/11664/1 "2017-09-13T12:20:45Z")

</div>

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’”)

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [13.Сентябрь.2017 12:23:50 UTC](https://forum.uipath.com/t/csv-automation/11664/2 "2017-09-13T12:23:50Z")

</div>

[InsertingColumnsToExistingFile(Autosaved).xaml](https://global.discourse-cdn.com/uipath/original/2X/4/4e59ae7f23bed4e4dd6a37be0243e8f3dd4bfbe7.xaml) (11.0 KB)  
this is what i have tried

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [13.Сентябрь.2017 12:24:26 UTC](https://forum.uipath.com/t/csv-automation/11664/3 "2017-09-13T12:24:26Z")

</div>

Refer this Xaml File…  
[csv Filter.xaml](https://global.discourse-cdn.com/uipath/original/2X/2/2019cfe188c121537417ecf82605b24d60628968.xaml) (12.0 KB)  
This is the example for read the csv file and Filter based on column name…

_ **Regards,** _  
_ **Poovarasan Guna.** _

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [13.Сентябрь.2017 12:24:52 UTC](https://forum.uipath.com/t/csv-automation/11664/4 "2017-09-13T12:24:52Z")

</div>

the file is a csv file

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [13.Сентябрь.2017 12:26:34 UTC](https://forum.uipath.com/t/csv-automation/11664/5 "2017-09-13T12:26:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [13.Сентябрь.2017 12:29:14 UTC](https://forum.uipath.com/t/csv-automation/11664/6 "2017-09-13T12:29:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [13.Сентябрь.2017 12:43:12 UTC](https://forum.uipath.com/t/csv-automation/11664/7 "2017-09-13T12:43:12Z")

</div>

Refer this…

[InsertingColumnsToExistingFile(Autosaved).xaml](https://global.discourse-cdn.com/uipath/original/2X/8/8c2292cdbd3f66fc4d72e43be9787d3a251644c8.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…**

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [13.Сентябрь.2017 12:49:49 UTC](https://forum.uipath.com/t/csv-automation/11664/8 "2017-09-13T12:49:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [13.Сентябрь.2017 12:58:51 UTC](https://forum.uipath.com/t/csv-automation/11664/9 "2017-09-13T12:58:51Z")

</div>

> [@CSV Automation](https://forum.uipath.com/t/csv-automation/11664/7):
>
> Refer this… [InsertingColumnsToExistingFile(Autosaved).xaml](https://global.discourse-cdn.com/uipath/original/2X/8/8c2292cdbd3f66fc4d72e43be9787d3a251644c8.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…

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…

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [13.Сентябрь.2017 13:22:15 UTC](https://forum.uipath.com/t/csv-automation/11664/10 "2017-09-13T13:22:15Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [13.Сентябрь.2017 13:25:35 UTC](https://forum.uipath.com/t/csv-automation/11664/11 "2017-09-13T13:25:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [14.Сентябрь.2017 05:18:16 UTC](https://forum.uipath.com/t/csv-automation/11664/12 "2017-09-14T05:18:16Z")

</div>

Hi @mudit,  
Try this…  
[InsertingColumnsToExistingFile(Autosaved).xaml](https://global.discourse-cdn.com/uipath/original/2X/b/b3e76dcd8ac35902623de2acb01c29610d374f63.xaml) (14.3 KB)  
**_Input_**  
 ![Capture](https://global.discourse-cdn.com/uipath/original/2X/1/1bc57ae9f2075bfde1fb77a0aa051d1ffde76a39.JPG)

**_Condition_**  
userDate=1/1/2000 in the format of **MM/DD/YYYY**  
**userDate\<csvFileDate**

**_Output_**  
 ![Capture](https://global.discourse-cdn.com/uipath/original/2X/1/13ca4cf56785eb4d9e4f4efdb9a39aebc72d10db.JPG)

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [14.Сентябрь.2017 07:17:32 UTC](https://forum.uipath.com/t/csv-automation/11664/13 "2017-09-14T07:17:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ovi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ovi/32/21072_2.png) [@ovi](https://forum.uipath.com/u/ovi)\
**Post date:** [14.Сентябрь.2017 07:23:27 UTC](https://forum.uipath.com/t/csv-automation/11664/14 "2017-09-14T07:23:27Z")

</div>

@mudit I think the limit is 1 million rows.

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [14.Сентябрь.2017 07:25:35 UTC](https://forum.uipath.com/t/csv-automation/11664/15 "2017-09-14T07:25:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [14.Сентябрь.2017 07:25:59 UTC](https://forum.uipath.com/t/csv-automation/11664/16 "2017-09-14T07:25:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [14.Сентябрь.2017 07:30:19 UTC](https://forum.uipath.com/t/csv-automation/11664/17 "2017-09-14T07:30:19Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [14.Сентябрь.2017 07:50:31 UTC](https://forum.uipath.com/t/csv-automation/11664/18 "2017-09-14T07:50:31Z")

</div>

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

 ![sample](https://global.discourse-cdn.com/uipath/original/2X/4/41baddc20358f9acc2acebd45aa61c232ab86803.png)

---

<div class="post-metadata">

**Author:** ![Poovarasan2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/poovarasan2/32/22560_2.png) [@Poovarasan2](https://forum.uipath.com/u/Poovarasan2)\
**Post date:** [14.Сентябрь.2017 07:57:50 UTC](https://forum.uipath.com/t/csv-automation/11664/19 "2017-09-14T07:57:50Z")

</div>

Can you Explain in Detail…

---

<div class="post-metadata">

**Author:** ![mudit](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mudit](https://forum.uipath.com/u/mudit)\
**Post date:** [14.Сентябрь.2017 08:01:34 UTC](https://forum.uipath.com/t/csv-automation/11664/20 "2017-09-14T08:01:34Z")

</div>

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

[Следующая страница](https://forum.uipath.com/t/csv-automation/11664.md?page=2)
