Results 1 to 8 of 8

Thread: Java

  1. #1
    abhi140291 is offline Member
    Join Date
    Nov 2013
    Posts
    9
    Rep Power
    0

    Default Java

    I WANT TO CONVERT DATA FROM xls to xml using java please someone provide the code cause i am new in java

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    929
    Rep Power
    2

    Default Re: Java

    And what did you expect from us when you wrote this? That we throw some code in your face that maybe does what you want, based on the terms "xls to xml"? And the only thing that is provided here on the forum is help, and not teh complete codez pls.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,720
    Rep Power
    5

    Default Re: Java

    Quote Originally Posted by abhi140291 View Post
    cause i am new in java
    That will need to change. Even if someone is crazy enough to give you code, you won't know how to apply it. XML processing is difficult stuff, forget about it for a few months until you've properly learned the basics.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    abhi140291 is offline Member
    Join Date
    Nov 2013
    Posts
    9
    Rep Power
    0

    Default Re: Java

    this is my code

    import jetr.nsef.api.xmlgenner.XMLGennerSingleton;
    import jetr.nsef.api.xmlgenner.XmlGenner;
    public class JavaApplication2 {

    /**
    * @param args the command line arguments
    */public static void main(String[] args) {
    try {
    XmlGenner x = XMLGennerSingleton.getXmlGenner();
    x.setCustomRows(1000);
    x.setSubRootElementName("Bank");
    x.generateXML_Item("D:/APNAKHATA/CS/in.xls", "D:/APNAKHATA/CS/out1.xml");

    } catch (Exception ex) {
    ex.printStackTrace();
    }
    }
    }


    for this i add two jar files jxl.jar and xmlgenner.jar this code is working onlly for the subroot elements i want to add root elements please suggest me

  5. #5
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,825
    Rep Power
    19

    Default Re: Java

    Ask whoever wrote xmlgenner how to use it?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #6
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    929
    Rep Power
    2

    Default Re: Java

    Question asked again here: import from xls to xml
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  7. #7
    abhi140291 is offline Member
    Join Date
    Nov 2013
    Posts
    9
    Rep Power
    0

    Default Re: Java

    i got the output its working but for adding root elements it not working

  8. #8
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,825
    Rep Power
    19

    Default Re: Java

    In that other thread it says you are getting errors.
    Please post them in full here, highlighting the line in your code that's causing the problem.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Tags for this Thread

Posting Permissions

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