• 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Generating Insert Script from Excel sheet  RSS feed

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
I am having a excel workbook which has n number of worksheet.
Each worksheet has m number of columns and certain number of rows.

Here each worksheet represent a Table and each sheet has the entries which represent the data for the tables.

Now i need to write a java class to create a insert script for each and every table.

How can i do this using java or is there anyother easy way to generate sql script from the given excel sheet.


Thanks
Param
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, what parts are you comfortable with and what gives you trouble? Reading data from Excel, building the SQL statement, writing the SQL statement to a script, something else?

It is possible to treat Excel as a database with the JDBC ODBC Bridge but Sun says The JDBC-ODBC Bridge driver is recommended only for experimental use or when no other alternative is available. The POI library is another option to read Excel.

Do you have some "almost working" code?
 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No i am yet at design stage.

I am looking for the possible way in which one can do it.
I heard abt jxl.* package and just want to choose the best option.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!