Results 1 to 4 of 4
  1. #1
    myugi12 is offline Member
    Join Date
    Jun 2011
    Posts
    2
    Rep Power
    0

    Default Need help with document reading/writing program

    Hey all,

    I am fairly new to java and looking to make a program to simplify some of the work I need to do daily. I have a Mac with the latest version of eclipse and the latest versions of Word and Excel.

    The goal of the program is to read an excel spreadsheet with a few pieces of information in about 13,000 rows. Then it will pick x number of random rows in the spreadsheet and print those selections in either a new Excel or Word document.

    I never learned how read/write to and from other files, and I am wondering if something like this is possible as it would save hours and hours of time.

    Thanks.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default

    See Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)
    and for reading Microsoft Office documents (word, excel,etc..), see Apache POI - the Java API for Microsoft Documents
    Both links have code examples that should get you started.

  3. #3
    myugi12 is offline Member
    Join Date
    Jun 2011
    Posts
    2
    Rep Power
    0

    Default

    Thanks I looked through those and I think I am basically done with the second half of my program. However, while reading the API for reading/recording an excel document, I am completely lost. I cant find a way to do what I want in the different things they list.

    I want the program to read my excel sheet, and return 1. The total number of columns with information in them in the document and 2. The information in each of the cells of that column

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default

    Thanks I looked through those and I think I am basically done with the second half of my program. However, while reading the API for reading/recording an excel document, I am completely lost. I cant find a way to do what I want in the different things they list.

    I want the program to read my excel sheet, and return 1. The total number of columns with information in them in the document and 2. The information in each of the cells of that column
    The examples in those links should hopefully help get you started, but probably won't do what you need. To use a 3rd party lib like apache POI you should become familiar with the API docs - the classes and methods of the library. The code snippets are just examples to get you started.

Similar Threads

  1. writing word document using poi hwpf
    By devday in forum New To Java
    Replies: 4
    Last Post: 08-07-2011, 11:15 AM
  2. reading tables word document
    By ashik03 in forum Advanced Java
    Replies: 1
    Last Post: 02-06-2010, 01:01 AM
  3. Reading and Writing to XML - Help Please!
    By JonnySnip3r in forum New To Java
    Replies: 4
    Last Post: 01-17-2010, 10:55 PM
  4. Reading Microsoft Word Document in JAVA
    By satheeshtech in forum Advanced Java
    Replies: 0
    Last Post: 07-18-2009, 08:21 AM
  5. Help with File reading and writing
    By baltimore in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 06:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •