Reading from csv file.plz help!!!!!!!!!!
Hi All
i am facing problem getting values from csv file.i want to read csv file line by line using an Array.Here is the code:
File file = new File("TestCaseDataRepository.csv");
BufferedReader bufRdr = new BufferedReader(new FileReader(file));
String line = null;
while((line = bufRdr.readLine()) != null)
{
String str[]=line.split(",");
for(int i=0;i<str.length;i++)
{
System.out.println(str[i]);
}
}
Now i want to read the fields in a particular line by using split()
Now the problem is if the particular field has values which is comma separated then it would also be separated as a different field.
what should i do??
Thanks in advance..:):)