Results 1 to 2 of 2
Thread: upload excel file into database
- 07-12-2009, 11:27 AM #1Member
- Join Date
- Jul 2009
- Rep Power
upload excel file into database
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.
- 07-13-2009, 09:13 PM #2
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:
Vehicle(name : string, kilometers : integer) Person(name : string, age : integer)
Good luck bhasker4. ;)
Last edited by tim; 07-13-2009 at 09:21 PM.Eyes dwelling into the past are blind to what lies in the future. Step carefully.
- By ravikumar.achi in forum New To JavaReplies: 20Last Post: 01-19-2012, 11:30 AM
- By liljejalil in forum JDBCReplies: 1Last Post: 02-28-2010, 03:11 AM
- By lavanya82 in forum JavaServer Pages (JSP) and JSTLReplies: 15Last Post: 07-28-2009, 04:15 PM
- By saran123 in forum JDBCReplies: 1Last Post: 10-10-2008, 08:47 AM
- By Priyadharshini.s in forum Advanced JavaReplies: 1Last Post: 03-08-2008, 06:12 PM