943,107 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 5108
  • Java RSS
Feb 1st, 2010
0

reading csv file using java

Expand Post »
java program to read csv file and store it in rbnb server please try to help me
Similar Threads
Reputation Points: 8
Solved Threads: 0
Newbie Poster
deepu.bhanu is offline Offline
2 posts
since Feb 2010
Feb 1st, 2010
0
Re: reading csv file using java
Google first for some CSV utility library, then Google for some "rbnb server" (whatever that is) utility library, and write a program to use them.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Feb 1st, 2010
-1

csv file using java

Click to Expand / Collapse  Quote originally posted by masijade ...
Google first for some CSV utility library, then Google for some "rbnb server" (whatever that is) utility library, and write a program to use them.
pleas try to give me source code for this its very urgent
Reputation Points: 8
Solved Threads: 0
Newbie Poster
deepu.bhanu is offline Offline
2 posts
since Feb 2010
Feb 1st, 2010
1
Re: reading csv file using java
Bzzzzzzt! Gong!!!!! Wrong answer! We are not here to do your work for you.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Feb 1st, 2010
0
Re: reading csv file using java
This is only a rough outline of how I would do what you're trying to accomplish. The specific implementation will vary from problem to problem.

java Syntax (Toggle Plain Text)
  1. public static void solveProblem(Problem problem){
  2. Effort attempt = new Effort();
  3. try{
  4. problem.applyEffort(attempt)
  5. catch(UnsolvedProblemException e){
  6. Daniweb.post();
  7. }
  8. }
Reputation Points: 15
Solved Threads: 0
Junior Poster in Training
OffbeatPatriot is offline Offline
68 posts
since Jul 2008
Feb 1st, 2010
0
Re: reading csv file using java
Search this forum to find how you can read any file line by line.
Then the String class has a method what will allow you to separate the line read like this:

line -> aaa,bbbb,cccc,
into this:
aaa
bbbb
cccc
Sponsor
Featured Poster
Reputation Points: 1005
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,256 posts
since Dec 2007
Feb 1st, 2010
2
Re: reading csv file using java
What about the following line (which is valid CSV)
a,"b,c","d""e""f,g",h
which should be
Java Syntax (Toggle Plain Text)
  1. a
  2. b,c
  3. d"e"f,g
  4. h

That's why you should look for a library, or you play around with indexOf and substring yourself (which I have been forced to do).
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Feb 2nd, 2010
0
Re: reading csv file using java
Click to Expand / Collapse  Quote originally posted by masijade ...
What about the following line (which is valid CSV)
a,"b,c","d""e""f,g",h
which should be
Java Syntax (Toggle Plain Text)
  1. a
  2. b,c
  3. d"e"f,g
  4. h

That's why you should look for a library, or you play around with indexOf and substring yourself (which I have been forced to do).
Ok.
Sponsor
Featured Poster
Reputation Points: 1005
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,256 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Problem with If statement
Next Thread in Java Forum Timeline: Digit occurence in a string





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC