From kotaiahkv at gmail.com Sat Jul 19 15:12:35 2008 From: kotaiahkv at gmail.com (kotaiah katragadda) Date: Sat, 19 Jul 2008 18:42:35 +0530 Subject: [Csv] read CSV file Message-ID: <1dd960fb0807190612t4adb3d40h6fb2f3cf05f00452@mail.gmail.com> // I AM NOT ABLE TO READ SECOND LINE. ALLWAYS OVERDING FIRST LINE ONLY. PLEASE HELP ME IN THIS public class Test { public static void main(String args[]){ String fileName="C:\\Documents and Settings\\ats67.ATS\\Desktop\\test.csv"; System.out.println("fileName==============="+fileName); InputStream in; ArrayList arr = new ArrayList(); ArrayList mainArr = new ArrayList(); OutputStream outputStream; try{ File file=new File(fileName); if(file.exists()){ if(file.canRead()){ in=new FileInputStream(file); CSVParser csvparser=new CSVParser(in); csvparser.setCommentStart("#;!"); csvparser.setEscapes("nrtf","\n\r\t\f"); int t1= csvparser.getLastLineNumber(); System.out.println("csvparser.getLastLineNumber" +t1); String[] t; int i=0; System.out.println("p line"+csvparser.getLine()); while((t = csvparser.getLine())!=null){ int kk= csvparser.getLastLineNumber(); System.out.println("csvparser.getLastLineNumber()="+kk); int length=t.length; System.out.println("length="+length); for(i=0;i From andrewm at object-craft.com.au Mon Jul 21 04:34:48 2008 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Mon, 21 Jul 2008 12:34:48 +1000 Subject: [Csv] read CSV file In-Reply-To: <1dd960fb0807190612t4adb3d40h6fb2f3cf05f00452@mail.gmail.com> References: <1dd960fb0807190612t4adb3d40h6fb2f3cf05f00452@mail.gmail.com> Message-ID: <20080721023448.E35C0600808@longblack.object-craft.com.au> >// I AM NOT ABLE TO READ SECOND LINE. ALLWAYS OVERDING FIRST LINE ONLY. >PLEASE HELP ME IN THIS Sorry - we can't help you: this list is for the Python CSV parser. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/