• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to read particular column from text file  RSS feed

 
nil wangad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
personid gender height class
1 female 1.6 short
2 male 2.0 tall
3 male 1.85 medium
4 female 1.9 medium
5 male 1.7 short
6 female 1.8 medium
7 female 1.95 medium


for eg i have to find minimum and maximum height from column height
thank you...
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the file line by line, split each line into parts, put the data in an appropriate data structure and do the necessary computations to calculate the desired result.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can transform the file to a CSV -maybe replacing spaces with commas is sufficient- you could use an existing library to help you out. See the "Excel" section in http://www.coderanch.com/how-to/java/AccessingFileFormats for that.
 
Pankaja Shinde
Ranch Hand
Posts: 87
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!