Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8485707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:43:25+00:00 2026-06-10T20:43:25+00:00

(Sorry for my mistakes in spelling) output came from .cvs file First Name,Last Name,Main-Email,Current

  • 0

(Sorry for my mistakes in spelling)
output came from .cvs file

“First Name”,”Last Name”,”Main-Email”,”Current Employer”,”Internal Contact ID”,”PSI Club Member Nbr.”,”Membership Type”,”Membership Status”,”Member Since”,”Membership Card Sent”,”Membership Start Date”,”Membership Expiration Date”,”Nationality 1″,”Membership ID”
“Pierre”,”ABT”,”piero.a@bluewin.ch”,,”1655″,”1350″,”Resident Renewal”,”Active”,”1968-01-01″,”February 10th, 2011″,”1968-01-01″,”1968-12-31″,,”1915″
“Bruno”,”ADAM”,”bruno.adam@bluewin.ch”,”OCTAVE GROUP”,”1656″,”5288″,”Resident Renewal”,”Active”,”2012-01-01″,”February 16th, 2012″,”2012-01-01″,”2012-12-31″,”France”,”424

i want output in this way..separate line between each data.How to do frnds..


 here is my code can any guide me..thanks in advance.
"Bruce", |"ADAMS", |"bruce.adams@bluewin.ch",|,"1657",|"883",|"Resident  Renewal",|"Active",|"2011-05-10",|,"2012-01-01",|"2012-12-31",|"Canada",
         |         |                         |               |                   | 
         |         |                         |               |                   |



import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.util.StringTokenizer;

public class FileRead {
/**
* @param args
*/
public static void main(String[] args) {
String fileName="C:/Users/Desktop/cvsFile.csv";
try {
BufferedReader br = new BufferedReader( new FileReader(fileName));
String strLine = null;
StringTokenizer st = null;
int lineNumber = 0, tokenNumber = 0;
while( (fileName = br.readLine()) != null)
{
lineNumber++;

  /* String[] result = fileName.split("[\r\n]+");
for (int x=0; x<result.length; x++) {
    System.out.println(result[x]);*/


//break comma separated line using ","
st = new StringTokenizer(fileName, "|");
while(st.hasMoreTokens())
{
//display csv values
tokenNumber++;
System.out.println("Line # " + lineNumber + " Token : "+ st.nextToken());
}
//reset token number
tokenNumber = 0;
}
 //  }
}
catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}

enter image description here

Is tr any option to do above image output in java..
I want d Output in this way. can any one guide me.. above there is a code…
In middle i need line that separate the Output data.
thanks in advance..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:43:27+00:00Added an answer on June 10, 2026 at 8:43 pm

    Why dont you just replace comma with the new separator like:

    str.replace(",", ",|,");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

sorry in advance for any orthographic mistakes (english is not my first language). I
I'm french, sorry for my spelling mistakes... I have a page containing a fancybox
i'm from poland so sorry for word mistakes. what's my problem? i've got array
First of all, sorry for my english if i make any grammar mistakes, etc
First of all sorry for my mistakes in English its not my primary language
(Sorry for my mistakes in spelling) I have a problem in the combination of
sorry about input mistakes, english its not my mother lang. I have this code
I have such class (sorry about posible mistakes, i'm writing it right here.) Class
I am new to the asp.net, and sorry for grammar mistakes. I have 3
IMPORTANT EDIT: Sorry everyone, i made a big mistake in the structure. char *name;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.