File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: Problem in csv file upload
It's not a secret anymore!