0

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$]');
EvanL
  • 73
  • 1
  • 13
  • Using [`OPENROWSET`](https://msdn.microsoft.com/en-us/library/ms190312.aspx) and [`OPENDATASOURCE`](https://msdn.microsoft.com/en-us/library/ms179856.aspx), that type of query, distributed query, can work in SQL Server. I doubt Oracle has that facility, no doubt part of the Microsoft ecosystem. – Parfait Jul 11 '16 at 22:34
  • I am stuck with Oracle so have no way to do this with SQL Server. Thanks though – EvanL Jul 11 '16 at 22:37
  • Oracle and SQL Server are different RDMS as are DB2, MySQL, and Postgre. While all share much of ANSI syntax, many of their other syntax are specific to them. Consider exporting Excel spreadsheet into csv (a universal industry type) where each have a [csv](http://stackoverflow.com/questions/6198863/oracle-import-csv-file) import facility. – Parfait Jul 11 '16 at 22:44

1 Answers1

0

There is the way but it isn't easy way. You can check this Read excel

New excel documents are saved in open xml standard. Thats mean xlsx file is set of zipedd xml files. You can change exension to zip and look what is inside. You can load seperated xml document into DB as xmltype and use xmlquery to extract data.

Arkadiusz Łukasiewicz
  • 6,241
  • 1
  • 11
  • 17
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/12976218) – diiN__________ Jul 12 '16 at 06:19
  • @ diiN_ There is no easy answer for this question. The article contains only essential part of answer. – Arkadiusz Łukasiewicz Jul 12 '16 at 07:11