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.61 KB

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/

Edited 5 Years Ago by javaNooblet: n/a

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.(:

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

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:)

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 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.

@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".

This article has been dead for over six months. Start a new discussion instead.