Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem in csv file upload

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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
.getDocFile().getInputStream()));
while ((line = bufReader.readLine()) != null) {
......

}


Problem:

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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"parthi"

Please check your private messages for a message from me.
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic