Insert Excel Spreadsheet into Oracle Table using SQL Statement

时间:2016-07-11 22:10:54

标签: sql excel oracle

I know there is a way to import an Excel spreadsheet into Oracle using SQL Developer. However, I am trying to find out if it is possible to import an Excel spreadsheet into an Oracle table using a SQL query statement. I have done this type of SQL query previously going from Excel to MS Access but am not trying to do the same thing for going from Excel to Oracle.

The query I have used for going from Excel to Access is as follows:

SELECT * INTO TABLENAME FROM ('Microsoft.Jet.OLEDB.4.0','Excel 12.0;IMEX=1;HDR=NO;DATABASE=EXCELPATH.xlsx', 'Select * from [EXCELSPREADSHEET$]');

1 个答案:

答案 0 :(得分:0)

有方法,但这不是一件容易的事。 您可以查看此Read excel

新的Excel文档以open xml标准保存。这意味着xlsx文件是zipedd xml文件的集合。您可以将拉伸改为拉链并查看内部的内容。 您可以将分隔的xml文档作为xmltype加载到DB中,并使用xmlquery来提取数据。