• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

import data from excel file into MYSQL database

 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does HSSFCell.getDateCellValue not do the right thing?
 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the cell contents are a string of length zero I'd consider a cell to be empty.
 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ulf,

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




--
M. Bharathi
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic