This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions.
There are 8 references cited in this article, which can be found at the bottom of the page.
This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 101,703 times.
Learn more...
This wikiHow teaches you how to connect an Excel workbook to an Oracle database using Power Query. Note that the Oracle connector is only available in Microsoft 365 Apps for Enterprise Edition, Office 2019 Professional Plus, and Office 2016 Professional Plus.[1]
Connecting Excel to Oracle: Fast Facts
Install both the Oracle Instant Client and the Oracle ODBC package, and add the install directory to your system path. To connect to the Oracle database in Excel, go to Data > Get Data > From Database, select From Oracle Database. Not all versions of Excel support Oracle DBs.
Steps
-
Download the Oracle Instant Client. Go to https://www.oracle.com/database/technologies/instant-client/downloads.html and click the download link for your operating system and processor type/architecture. You can opt for the Basic or Basic Light version—the only difference is that Basic Light only includes English error messages and Unicode, ASCII, and Western European character set support.[2]
- To find your architecture on Windows, type "System Information" into the Windows search bar, and check the value of "System type."
- If you're using a Mac, you'll see separate download links for Intel and ARM processors. If you have an Apple silicon processor, choose the ARM download. You can find your processor type in the Apple menu > About this Mac.[3]
-
Install the client.
-
Windows
- Unzip the files.
- Move the files to an easy-to-remember location, such as C:\Oracle\instantclient_23_4.
- Add the directory to the PATH environment variable.[4]
-
Mac
- Double-click the DMG file to mount it.
- Open a Terminal and enter the directory of the mounted package using the cd command. For example, cd /Volumes/instantclient-basic-macos.x64-19.16.0.0.0dbru.[5]
- Type ./install_ic.sh and press Return.
- Add the install directory to your path using the command export PATH=$PATH:/Users/user-name/Downloads/instantclient_23_3. Replace "user-name" with your username, and the version of Instant Client with the version you downloaded.
Advertisement -
Windows
-
Download the ODBC package. Return to the Oracle Instant Client download page and click the version you installed. Click the latest version number, then scroll down to the "ODBC Package" section. Click the download link to save the file.
-
Install the ODBC driver.
-
Windows
- Extract the ZIP file and copy its contents to the directory where you installed the Instant Client.
- Run the odbc_install.exe file in the instant client directory. If you get a security warning, click More and allow it to run anyway.
-
Mac
- Mount the DMG file.
- Open a Terminal and enter the directory of the mounted package using the cd command. For example, cd /Volumes/instantclient-obdb-macos.x64-19.16.0.0.0dbru.
- Type ./install_ic.sh and press Return.
-
Windows
-
Open your workbook in Microsoft Excel. Excel comes with a feature called Power Query (also called Get & Transform) that makes it easy to connect to an Oracle database.[6]
- If you haven’t installed the Oracle client software on your computer, you’ll need to do so first. You can get the latest version from https://www.oracle.com/database/technologies/instant-client/downloads.html.
- On a Mac, Power Query is not supported on Excel 2019 and earlier.[7]
-
Click the Data tab. It’s at the top of the screen.
-
Click Get Data. If you don’t see this option, click New Query or Get External Data instead.
-
Click From Database.
-
Click From Oracle Database. This option is only available if you're using Microsoft 365 Apps for Enterprise Edition, Office 2019 Professional Plus (PC), or Office 2016 Professional Plus (PC).
-
Enter the Oracle server name into the ″Oracle Database″ box. This should be the hostname or address of the server that hosts your database.
- If the database requires an SID, use this format to type the server name/address: servername/SID.[8]
-
Enter a native database query (optional). If importing data from the database requires a specific query, expand the ″SQL Statement″ box by clicking the small triangle, and then type the statement.[9]
-
Click OK. This saves your options and initiates a connection to the database.
-
Log into the database. If the database requires you to log in, enter your username and password, and then click Connect. This connects the workbook to the database.
- Depending on your settings, you may also have to choose an authentication method.
- If you entered a native database query, the results will appear in a Query Editor window.
Expert Q&A
Tips
References
- ↑ https://support.microsoft.com/en-us/office/power-query-data-sources-in-excel-versions-e9332067-8e49-46fc-97ff-f2e1bfa0cb16?ui=en-us&rs=en-us&ad=us
- ↑ https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
- ↑ https://support.apple.com/en-us/116943
- ↑ https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
- ↑ https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html
- ↑ https://support.office.com/en-us/article/connect-to-an-oracle-database-power-query-d7fbd231-a705-4eb7-83b3-a66bfb678395
- ↑ https://support.microsoft.com/en-us/office/power-query-data-sources-in-excel-versions-e9332067-8e49-46fc-97ff-f2e1bfa0cb16?ui=en-us&rs=en-us&ad=us
- ↑ https://support.office.com/en-us/article/connect-to-an-oracle-database-power-query-d7fbd231-a705-4eb7-83b3-a66bfb678395
- ↑ https://support.office.com/en-us/article/import-data-from-database-using-native-database-query-power-query-f4f448ac-70d5-445b-a6ba-302db47a1b00
About This Article
1. Click Data.
2. Click Get Data.
3. Click From Database.
4. Click From Oracle Database.
5. Enter the server name.
6. Enter a query (optional).
7. Click OK.
8. Log in to the database.













