This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes import data from excel file into MYSQL database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "import data from excel file into MYSQL database" Watch "import data from excel file into MYSQL database" New topic
Author

import data from excel file into MYSQL database

muthu bharathi
Ranch Hand

Joined: Dec 10, 2008
Posts: 97
Hi,

i have developed an application, in this applicaton i want to import the data's from excel file in to MYSQL database.

Please any one give me suggesion. is it possible? if possible please guide me how can i proceed?


--
with thanks
M. Bharathi
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41151
    
  45
You can use the Apache POI library to read XLS files.

Then you'd use the JDBC API to store that data into a database.

Which of these parts has you stumped?


Ping & DNS - my free Android networking tools app
muthu bharathi
Ranch Hand

Joined: Dec 10, 2008
Posts: 97
Hi ulf,

Thanks a lot. Now i used Apache poi and jdbc API. i got the output .. but i have one problem in that .

1. how toread the date and time from excel.

others are i got it. thanks once again.

--
M. Bharathi

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41151
    
  45
Does HSSFCell.getDateCellValue not do the right thing?
muthu bharathi
Ranch Hand

Joined: Dec 10, 2008
Posts: 97
Hi ulf,

Thanks a lot ulf. i got it .. really thanks for u.

i have one more query how to i check the cell contains data or not. please give me suggestion.



--
Advance thanks,
M. Bharathi
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41151
    
  45
If the cell contents are a string of length zero I'd consider a cell to be empty.
muthu bharathi
Ranch Hand

Joined: Dec 10, 2008
Posts: 97
Hi ulf,

Thanks ulf, i got it... really very thanks...




--
M. Bharathi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: import data from excel file into MYSQL database
 
Similar Threads
import excel data into mysql database?
importing data from excel to Mysql database using jsp code
How to generate excel report
Dynamic table creation based on excel template.
how to create the .rptdesign file using birt api