Some time ago I made a comparison between different frameworks for working 
with csv files. Of all, supercsv framework was my chose. Here is an how to 
do example for read: 



            InputStreamReader inputReader = new InputStreamReader(
                    new FileInputStream(_sourceFile), _inputCharset);

            CsvListReader reader = new CsvListReader(inputReader,
                    _preferences.getSuperCsvPreferences());

            int tempLength;
            List<String> currentLine;

            while ((currentLine = reader.read()) != null) {

                row++;

                tempLength = currentLine.size();

                for (j = 0; j < tempLength; j++) {
                    column++;

                    columnValue = currentLine.get(j);
                    //do something with columnValue...
                }

            }


it's simple...

Regards



Hi,

i would like to know about to read/parse csv files.

it would be great if you provide any sample code for the same

-- 
Thanks & Regards,
Karthick.G
9884198362


**********************************************************************************************
No imprimas este correo si no es absolutamente necesario. Piensa en el medio 
ambiente.

Este mensaje y los ficheros anexos que, en su caso, incorpore pueden contener 
información confidencial o 
de uso exclusivamente interno de CAJA DE AHORROS DE VALENCIA, CASTELLON y 
ALICANTE, 
BANCAJA, sujeto a secreto profesional.
Si Ud. lo recibe por error o considera que no es el destinatario del mismo, 
deberá destruirlo y comunicar al 
emisor esta circunstancia, no pudiendo en ningún caso distribuir, divulgar ni 
copiar el mensaje.

**********************************************************************************************

Reply via email to