my dog learned polymorphism*
The moose likes JDBC and the fly likes Dynamic table creation based on excel template. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Dynamic table creation based on excel template." Watch "Dynamic table creation based on excel template." New topic
Author

Dynamic table creation based on excel template.

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Hi,

I need to import excel file into Oracle database through java but the structure of the excel file is not predefined. For Ex : There can be 3 columns in the excel file and next time there can be 5 columns in the excel file.

So is it possible to create a database table through java based on the Excel file. The file with new excel template will have different file name.

so if i have the excel file with the same name i need to insert the data into the exiting table otherwise i need to create a new table.

Is it possible ? if not can anybody suggest me the alternative for this kind of requirement. For the new excel file i can select the columns which i want to import, their datatype,length.


Jigar Naik


Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

Yes. Oracle supports creating a table through JDBC. Assuming your user has permissions to create a table of course.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamic table creation based on excel template.
 
Similar Threads
Can I write Microsoft Excel file using my Java code?
Dealing with excel
Deleting columns in excel file to create new Excel file
Windward Java Engine Review
Write Data to Excel