This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Problem in csv file upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem in csv file upload" Watch "Problem in csv file upload" New topic

Problem in csv file upload


Joined: Dec 09, 2007
Posts: 5

In our application we are uploading a .csv file value to database.I am reading the comma delimited (.csv) file line by line and validating the values.Using StringTokenizer i am making string arry and validating the values.

I am using following code to read comma delimited (.csv) file.

// Code

StringBuffer strTemp = new StringBuffer();
bufReader = new BufferedReader(new InputStreamReader(uploadForm
while ((line = bufReader.readLine()) != null) {



When the user uses Alt+enter within the cell value ,reader is not reading full line.Since the line separator is there, it is taking the value after the Alt+enter as second line value.

Can anyone help me to solve this issue? Please suggest me anyother way to do read the complete line
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336


Please check your private messages for a message from me.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
It is sorta covered in the JavaRanch Style Guide.
subject: Problem in csv file upload
It's not a secret anymore!