Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Parsing CSV

 
Greenhorn
Posts: 4
Netbeans IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have csv file containing data as ::

#utsComBmmCfgBrdChassisId,utsComBmmCfgBrdSlotId,utsComBmmCfgBrdDaughterId,utsComBmmCfgBrdBrdType,
0,1,0,15
0,2,0,15
0,3,0,60
0,4,0,60
0,5,0,17
0,6,0,23
0,7,0,23
0,8,0,17
0,9,0,40
0,10,0,81
0,11,0,40
0,12,0,81
0,14,0,23
0,21,0,25
0,22,0,25


Now i need to parse that file using java and get the output data as ::

utsComBmmCfgBrdChassisId 0
utsComBmmCfgBrdSlotId 1
utsComBmmCfgBrdDaughterId 0
utsComBmmCfgBrdBrdType 15

utsComBmmCfgBrdChassisId 0
utsComBmmCfgBrdSlotId 2
utsComBmmCfgBrdDaughterId 0
utsComBmmCfgBrdBrdType 15

utsComBmmCfgBrdChassisId 0
utsComBmmCfgBrdSlotId 3
utsComBmmCfgBrdDaughterId 0
utsComBmmCfgBrdBrdType 60

like this i need to print .


Please help me requirement is urgent .


 
lowercase baba
Posts: 13014
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We don't hand out homework answers. You'll have to do it yourself.

We will bend over backwards to help you, but you'll get a lot more out of this site if you ask specific, focused questions, rather than simply post "write this code for me" style questions.
 
Ranch Hand
Posts: 326
Android Mac OS X Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm done writing the program. Please send me the Purchase Order for invoicing and details for how to deliver the code. Total cost was $205 (I always charge at least one hour). ;)
 
Saloon Keeper
Posts: 7173
166
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The https://coderanch.com/how-to/java/AccessingFileFormats page lists several libraries for working with CSV files. Much better than reinventing the wheel.
 
reply
    Bookmark Topic Watch Topic
  • New Topic