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: Java code to read an excel file and populate the data into oracle database

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java code to read an excel file and populate the data into oracle database

    Hello everyone

    New to Java. Got an assignment. Struck with it

    Need some help

    I have to read an excel file and populate the data into oracle database

    The excel sheet is pre defined format where the user enters the data and uploads the file with data

    The excel has the following columns

    1) Name
    2) Marks1
    3) Marks2
    4) Marks3

    Immediately after the first row where these column names are displayed the user will enter the data

    Now coming to database, I have 2 tables, one is NM_MSTR and other is CHL_DTL

    NM_MSTR contains all the names along with a PK_ID

    The child data contains the following

    1) FK_NM_ID - this is link to PK_ID of NM_MSTR
    2) MRKS1 - This corresponds to Marks1 in Excel
    3) MRKS2 - This corresponds to Marks2 in Excel
    4) MRKS3 - This corresponds to Marks3 in Excel

    Now once i get the excel, I need to read data and upload into CHL_DTL. First i need to read row wise. When i read the first record, I need to check if the text entered in "NAME" column of excel exists in database i.e. the master table. If it does then I need to extract the id from the master and post the id along with the marks into CHL_TBL

    I need to use string Tokenizer. Pls help


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Need some help - Urgent

    Hello aks_java and welcome to the forums

    Does this tutorial help you at all?

    http://www.javaprogrammingforums.com...jdbc-java.html

    Please post whatever code you have and we can take it from there...
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Replies: 2
    Last Post: May 16th, 2009, 05:23 AM