954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

reading csv file using java

java program to read csv file and store it in rbnb server please try to help me

deepu.bhanu
Newbie Poster
2 posts since Feb 2010
Reputation Points: 8
Solved Threads: 0
 

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.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 
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

deepu.bhanu
Newbie Poster
2 posts since Feb 2010
Reputation Points: 8
Solved Threads: 0
 

Bzzzzzzt! Gong!!!!! Wrong answer! We are not here to do your work for you.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

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.

public static void solveProblem(Problem problem){
    Effort attempt = new Effort();
    try{
        problem.applyEffort(attempt)
    catch(UnsolvedProblemException e){
        Daniweb.post();
    }
}
OffbeatPatriot
Junior Poster in Training
68 posts since Jul 2008
Reputation Points: 15
Solved Threads: 0
 

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

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 

What about the following line (which is valid CSV)
a,"b,c","d""e""f,g",h
which should be

a
b,c
d"e"f,g
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).

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

What about the following line (which is valid CSV) a,"b,c","d""e""f,g",h which should be

a
b,c
d"e"f,g
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.

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You