How Do I Load Data Stored in A Microsoft Excel File?: Step 1: Install ODBC Driver For Excel
How Do I Load Data Stored in A Microsoft Excel File?: Step 1: Install ODBC Driver For Excel
Scenario
A company stores its employee data in an Excel file called employees.xls. This file
contains two worksheets: employee_details and job_history. You need to load
the data from the employee_details worksheet into a target table in Warehouse
Builder.
Solution
To load data stored in an Excel file into a target table, you must first use the Excel file
as a source. Warehouse Builder enables you to source data stored in a non-Oracle
source, such as Microsoft Excel, using the Heterogeneous Services component of the
Oracle database.
Figure 3–1 describes how the Oracle database uses Heterogeneous services to access a
remote non-Oracle source.
Case Study
This case study shows you how to use an Excel file called employees.xls as a
source in Warehouse Builder.
Here, odbc_excel is the name of the system DSN you created in Step 3. Excel_SID
is the name of the Oracle system identifier used for the agent.
1. For the SID_NAME parameter, use the SID that you specified in Step 4 when
creating the initialization parameter file for the Heterogeneous Services.
2. Ensure that the ORACLE_HOME parameter value is the path to your Oracle home
directory.
3. The value associated with the PROGRAM keyword defines the name of the agent
executable.
Remember to restart the listener after making these modifications.
Notice that the Oracle Service Name field uses the Oracle system identifier
specified for the agent.
3. Ensure that the Use for Heterogeneous Services option is selected.
Because you are not accessing an Oracle database, you can enter any value for
username and password.
4. Create and test this database link. Close the New Database Link dialog.
5. Leave the Schema name <unspecified>. Click the Change Schema button and
select <unspecified>. The Connection Information page now looks as shown in
Figure 3–4.
6. Create a new deployment location for the module or specify an existing location.
Step 7: Import Metadata from Excel Using the Metadata Import Wizard
Use the Metadata Import wizard to import metadata from the Excel file into
Warehouse Builder. Select Tables as the Filter condition. The wizard displays all the
worksheets in the source Excel file under the Tables node in the list of available
objects.
1. Select employee_details and use the arrow to move it to the list of selected
objects.
2. Click Finish to import the data.
The data from the employee_details worksheet is now stored in a table called
employee_details in the ODBC source module created in Step 6.