954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

import data from Excel to mysql db using Java

The attached image is the example of .xls file that I want to import those data to mysql database using Java. Any help I get will be very much appreciated.

Attachments untitled.jpg 26.61KB
pote86
Newbie Poster
5 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

I just started recently working with java and excel files(still learning), but I have not incorporated mySQL in it.

But here are a couple basic sites for getting started with java and excel that I have found useful:

http://www.vogella.de/articles/JavaExcel/article.html#createexcel
http://www.andykhan.com/jexcelapi/tutorial.html

Hope these help, I found them great for learning how to deal with java and excel. Also, if you want to work with excel in java you will need to import this excel library, which can be found here:

http://sourceforge.net/projects/jexcelapi/files/

javaNooblet
Junior Poster
133 posts since Sep 2011
Reputation Points: 28
Solved Threads: 2
 

Thanks a lot for your help. :)

pote86
Newbie Poster
5 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

Hi pote86, so did you manage to import data from excel to sql in java?
If so, how did you go about doing it? Im currently trying to do it, any help will be much appreciated.(:

androidf
Newbie Poster
15 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

I used PHP to import the data. I am not able manage to do this with Java. :)

pote86
Newbie Poster
5 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 
I used PHP to import the data. I am not able manage to do this with Java. :)

Okay, will look for other methods then. I've already exported the data into excel spreadsheet using java and now have to transfer the data into sql db. Thanks for your reply tho:)

androidf
Newbie Poster
15 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

Time to look into Apache POI HSSF+XSSF that is Java API To Access Microsoft Excel Format Files

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 
Time to look into Apache POI HSSF+XSSF that is Java API To Access Microsoft Excel Format Files

Instead of importing from excel, would it be better if i saved all the data directly to the database? And just use SQL insert statements. My work is regarding android forensics.(platform: Eclipse/SQL db) Thanks.

androidf
Newbie Poster
15 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

@androidf sorry my reply was to original poster failing to find library capable of handle excel data extraction with Java. As for you please create new thread in Mobile Development section, since you work on Android, and please provide more in detail info of what you trying to do.

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 
@androidf sorry my reply was to original poster failing to find library capable of handle excel data extraction with Java. As for you please create new thread in Mobile Development section, since you work on Android, and please provide more in detail info of what you trying to do.

Okay thanks, new thread created: "Android: Import data in excel to mySQL database using java".

androidf
Newbie Poster
15 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You