Results 1 to 2 of 2
  1. #1
    syntel is offline Member
    Join Date
    Jul 2009
    Rep Power

    Default Need to read an excel file and print it as an xml

    Hi all,

    I have a requirement in my project for which i need some guidance.I have an excel sheet something similar to this .Please note that in the first 2 rows the columns "id" and "Name" have the same values but hobbies are different.

    id Name Hobbies
    1 Xxx Reading
    1 Xxx Movies
    2 Yyy Singing
    3 Zzz Stamp collection
    3 Zzz Sports

    Now i want this to be converted to an xml which would look something similar to this:


    I want the id and Name to be taken only once but the hobbies(which is repeated in the excel) should be repeated in the xml for that particular id.

    Can someone tell me how to achieve this in Java?


  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power


    POI (or JExcel) to read the excel.
    Write down your logic for what to do as you cycle down the rows, which will vary depending on if the Excel is ordered or not.
    Try and aim to write out the XML as you're traversing the excel rows, if at all possible.

Similar Threads

  1. How to read Excel file with java
    By chetan-24 in forum New To Java
    Replies: 6
    Last Post: 09-13-2014, 01:43 PM
  2. Excel file read error
    By Asvin in forum New To Java
    Replies: 10
    Last Post: 04-28-2011, 11:01 PM
  3. How to read Excel file in java
    By nagaraj in forum New To Java
    Replies: 7
    Last Post: 03-18-2011, 06:09 AM
  4. how to read excel file through java program
    By madhuragowda in forum New To Java
    Replies: 2
    Last Post: 04-16-2010, 09:53 AM
  5. How to Read Excel file??
    By spalax in forum New To Java
    Replies: 3
    Last Post: 08-15-2009, 06:06 AM

Posting Permissions

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