Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Convert text to excel

  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Convert text to excel

    "HELP"
    How i can convert any text file to excel file?
    For Example : -
    if i text file - test.txt that contain following format

    Company Name: XYZ Date: 22/12/2010
    =========================================
    Srno department location position
    =========================================
    1 abc mum SE
    2 efg pune PA


    I want convert this in excel format with proper row and columns. At the same time I want I can convert any text file to excel means application should not be file specific.


  2. #2
    Junior Member
    Join Date
    Dec 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Convert text to excel

    try using the FILE library

    File save = new File("path.type");
    FileWriter fw = new FileWriter(save);
    PrintWriter pw = new PrintWriter(fw);

    try
    {
    pw.write(what to write);
    pw.close;

    }

    catch(Exception IOE)
    {
    SOS("ERROR" + IOE);
    }

Similar Threads

  1. Excel Files
    By aussiemcgr in forum Java Theory & Questions
    Replies: 1
    Last Post: September 24th, 2010, 12:50 PM
  2. Appending to excel using POI
    By krishnamohan in forum Java Theory & Questions
    Replies: 8
    Last Post: August 19th, 2010, 05:40 AM
  3. java program to copy a text file to onother text file
    By francoc in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: April 23rd, 2010, 03:10 PM
  4. conversions and excel
    By mkslt4 in forum Java Theory & Questions
    Replies: 2
    Last Post: February 10th, 2010, 01:54 AM
  5. Export to excel
    By ebosysindia in forum File I/O & Other I/O Streams
    Replies: 7
    Last Post: May 14th, 2009, 06:25 AM