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 7 of 7

Thread: creating a excel from Swing:

  1. #1
    Member
    Join Date
    Apr 2014
    Posts
    224
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default creating a excel from Swing:

    I wrote a program that asks the user to enter some information, does some calculations and tells them what they need to order. I know there is a way I just do not know how to do it. I would like the output from the program which is presented in text fields to be printed onto a form I made in excel when a button is pressed. Is there a link or a few pointers someone could give me?

    I am not set on excel, it could be Microsoft word. I just need a form generated.
    Last edited by jocdrew21; July 9th, 2014 at 10:47 AM.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,744
    My Mood
    Mellow
    Thanks
    233
    Thanked 710 Times in 696 Posts

    Default Re: creating a excel from Swing:

    Start with saving the data to a text file (I guess). Here's the beginning of the Oracle I/O tutorial thread. Excel can read from files in Comma Separated Values or CSV files, so you might read up on that. The Word file format is more complicated, so I'm not sure you mean that to be an option.

  3. #3
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    718
    Thanks
    0
    Thanked 132 Times in 115 Posts

    Default Re: creating a excel from Swing:

    If you google "java excel file create" you will get dozens of useful tutorials about this topic.

  4. #4
    Member
    Join Date
    Apr 2014
    Posts
    224
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default Re: creating a excel from Swing:

    Yes I naturally used google but just wanted to see which one some of you are using. I found apache has a framework for this that I will be trying out. I just hate adding frameworks for my Eclipse IDE because it is VERY slow. About 15-20 seconds for run a program every single time.

  5. #5
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,744
    My Mood
    Mellow
    Thanks
    233
    Thanked 710 Times in 696 Posts

    Default Re: creating a excel from Swing:

    my Eclipse IDE because it is VERY slow. About 15-20 seconds for run a program every single time
    That's not right, but a different thread.

  6. #6
    Member
    Join Date
    Apr 2014
    Posts
    224
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default Re: creating a excel from Swing:

    That's not right, but a different thread.
    GragBrannon I already posted something on that on here and the Eclipse site. No one could help me

  7. #7
    Junior Member
    Join Date
    Jul 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: creating a excel from Swing:

    Apache POI is what u need, u can get that form here -http://poi.apache.org/download.html#POI-3.10-FINAL
    here is the how to use guide- Busy Developers' Guide to HSSF and XSSF Features
    hope this helps

Similar Threads

  1. Replies: 4
    Last Post: January 10th, 2014, 04:25 AM
  2. Creating table with layout in excel through java code
    By kvangala in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 26th, 2012, 12:07 PM
  3. Creating an Excel file using apache poi
    By mija in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: August 17th, 2012, 05:15 AM
  4. Replies: 1
    Last Post: August 3rd, 2011, 02:28 PM
  5. Creating Excel Pivot Tables using Java
    By prasad.virgo in forum Threads
    Replies: 4
    Last Post: August 4th, 2010, 12:20 PM