I am trying to follow everybody's advice and use a library for my CSV writing/parsing needs. But the most recommended, FileHelpers
, needs a column-mapping class. However, I just need to read write single lines of comma separated values, then parse them back later. I can't find a way to use FileHelpers or other libraries in this simple way.
For example, I make a String testInput = "\"yoyo\",\"yaya\",\"te\"\"st\"";
as input, and want to parse it into a String[]
with values yoyo
,yaya
,te"st
.
Also I need to do the opposite, writing the values back to the string like this "yoyo","yaya","te"st"
.
Does anyone know of a library that can do this or how I can use for example FileHelpers for this?
I don't really want to do xml because of the amount of "junk" characters involved in xml fields (bandwidth/storage limitations).