Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

import data from excel file into MYSQL database

 
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
 
Rancher
Posts: 43016
76
  • 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: 43016
76
  • 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: 43016
76
  • 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
 
bacon. tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic