# Delimited FlatFile reader - Question from New User

**URL:** <https://forum.cloverdx.com/t/delimited-flatfile-reader-question-from-new-user/13>\
**Category:** CloverDX Platform\
**Created:** [March 25, 2007, 12:00am UTC](https://forum.cloverdx.com/t/delimited-flatfile-reader-question-from-new-user/13 "2007-03-25T00:00:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohandatki.com](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@mohandatki.com](https://forum.cloverdx.com/u/mohandatki.com)\
**Post date:** [March 25, 2007, 12:00am UTC](https://forum.cloverdx.com/t/delimited-flatfile-reader-question-from-new-user/13/1 "2007-03-25T00:00:00Z")

</div>

I am exporting an excel file into a csv text and trying to parse this data using delimited flatfile reader. The file is , delimited (dumped from excel using the save as feature).

One of the string inside has , by itself as it is a long comment string.

I need an optional way of specifying the fact that these strings are within double quotes ie “STRING” and STRING itself will contain some commas which should be skipped.

e.g. orderid, comment, itemname are the three fields  
File is delimited by ,  
comment in some cases is within comma and double quotes (when there is a comment which contains comma) or it is delimited just by comma from orderid.

I am wondering whether the format parameter for fields will help here.

Any pointers will be greatly appreciated.

thanks  
mohan s.

---

<div class="post-metadata">

**Author:** ![jausperger](https://avatars.discourse-cdn.com/v4/letter/j/6bbea6/32.png) [@jausperger](https://forum.cloverdx.com/u/jausperger)\
**Post date:** [April 4, 2007, 2:37pm UTC](https://forum.cloverdx.com/t/delimited-flatfile-reader-question-from-new-user/13/2 "2007-04-04T14:37:04Z")

</div>

Hello,

delimited reader defines only line and field delimiter, more complicated structure isn’t possible. To be able to skip some substring you need append a reformat component.

Try something like this:

 import org.jetel.\*; 

public class reformatOrders extends DataRecordTransform{  
DataRecord source,target;  
int counter;  
String message;

public boolean transform(DataRecord \_source, DataRecord \_target){  
source=\_source[0]; target=\_target[0];  
try{  
SetVal.setInt(target,“orderid”,GetVal.getInt(source,“orderid”));  
message = GetVal.getString(source,“messagecomment”)  
// some operation over message  
SetVal.setString(target,“messagecomment”,message);  
}catch(Exception ex){  
message=ex.getMessage()+" -\>occured with record :"+counter;  
throw new RuntimeException(message);  
}  
counter++;  
return true;  
}  
}

ja

---

<div class="post-metadata">

**Author:** ![mzatopek](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mzatopek](https://forum.cloverdx.com/u/mzatopek)\
**Post date:** [May 11, 2007, 8:54am UTC](https://forum.cloverdx.com/t/delimited-flatfile-reader-question-from-new-user/13/3 "2007-05-11T08:54:07Z")

</div>

Maybe you are searching for our Universal data reader, check out ‘quotedStrings’ attribute in the documentation.

Martin Zatopek

---

<div class="post-metadata">

**Author:** ![mukunku](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mukunku](https://forum.cloverdx.com/u/mukunku)\
**Post date:** [February 27, 2018, 7:59pm UTC](https://forum.cloverdx.com/t/delimited-flatfile-reader-question-from-new-user/13/4 "2018-02-27T19:59:40Z")

</div>

I find it disappointing that the Flat File Reader can’t read a RFC 4180 compliant CSV. The reader requires commas to be quoted themselves where as the standard recommends enclosing the entire string in quotes.

---

<div class="post-metadata">

**Author:** ![Vladimir\_Barton](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/vladimir_barton/32/167_2.png) [@Vladimir\_Barton](https://forum.cloverdx.com/u/Vladimir_Barton)\
**Post date:** [March 5, 2018, 2:19pm UTC](https://forum.cloverdx.com/t/delimited-flatfile-reader-question-from-new-user/13/5 "2018-03-05T14:19:31Z")

</div>

Hi Mukunku,  
I have noticed your post concerning this topic and it appears that this thread is more than 10 years old. The good news is that Clover has evolved since then and the functionality that handles RFC 4180 compliant CSV files is now there. Feel free to review the attached example graph as a demonstration of how this can be approached. Worth noting is that FlatFileReader is capable of extracting the metadata automatically with no additional manual changes needed. Hope this helps.  
Kind regards,

- [parsingCSVfile.zip](https://cdn.cloverdx.com/forum/18401%5F7a074485e6f19de8f4fc155b0a6c6fb1/parsingCSVfile.zip)
