CsvToBean and BeanToCsv Example – Using OpenCSV

In my previous article we have learnt how to read/write a csv file using OpenCSV, in both Reading a CSV file and Exporting data to CSV File we just displayed the output in the console. In case of saving/retrieving the data that method will not be helpful and we will be needing the support of Object Oriented Concept (A bean for holding the values). In this example we will learn how to parse a csv file and save data to a bean and vice-versa(bean to csv file). [Read more…]