Click here to Skip to main content
15,889,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a fileupload option where user can upload the excel file with different columns each time, there is no fixed table structure. Each time i need to take data from excel file and need to create a table with that columns in excel.

Eg:

CREATE TABLE ORA_TABLE AS SELECT * FROM EXCEL_DATA;

Please suggest me how can i achieve this.

What I have tried:

I tried with the table if it was already there. But in this case Oracle table wont be there i need to create as per excel.
Posted
Comments
j snooze 11-May-18 17:55pm    
This doesn't seem like a well designed idea, but you'll need to create a CREATE TABLE statement off of the structure of the excel columns. So loop through the column headings to create the field names from the excei file, run the create table, then insert the rows of data from the excel file. not knowing the extent of your file, I'm assuming it has headings so you know what is in the columns.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900