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

    Default upload excel file into database

    Hi ,

    i have mulitple tables and multilpe excel files,i need insert excel file data into table . The table must be select based on the excel file data that means excel file schema and data base scehma must be match. if both match then we have to insert the excel file data into table.
    peresntly i am able to read excel file and data types of the columns,if first row contain data then i able to decide which table i have need insert ,problem is when there is blank cell in the first row at that time i am unable to decide which table i have to insert into which table

    Please help me ,any one.

    thanks,
    Bhasker

  2. #2
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    8

    Default

    Welcome bhasker4, to Java Forums! :D

    Recently I also imported data from excel documents into my database using Java. I read the spreadsheets using CSV and string scanning. I'm guess that you are trying to import the data by dynamically assigning a table to a spreadsheet depending on the data types. What I would rather do is to hard code which spreadsheet is for which table. The main problem with your approach is one we also get in OO programming. Signature ambiguity. For example, if you have two spreadsheets:
    Java Code:
    Vehicle(name : string, kilometers : integer)
    Person(name : string, age : integer)
    Which spreadsheet goes to which table? Rather code it explicitly. Or maybe, you can get professional software to automate this for you.

    Good luck bhasker4. ;)
    Last edited by tim; 07-13-2009 at 10:21 PM.
    Eyes dwelling into the past are blind to what lies in the future. Step carefully.

Similar Threads

  1. Upload excel data to access database
    By ravikumar.achi in forum New To Java
    Replies: 20
    Last Post: 01-19-2012, 12:30 PM
  2. File upload into database using Hibernate
    By liljejalil in forum JDBC
    Replies: 1
    Last Post: 02-28-2010, 04:11 AM
  3. Hi i need a code for excel sheet upload to database
    By lavanya82 in forum JavaServer Pages (JSP) and JSTL
    Replies: 15
    Last Post: 07-28-2009, 05:15 PM
  4. Replies: 1
    Last Post: 10-10-2008, 09:47 AM
  5. Excel to database using java
    By Priyadharshini.s in forum Advanced Java
    Replies: 1
    Last Post: 03-08-2008, 07:12 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
  •