4 Preparing Your Integrated Excel Workbook
This chapter includes the following sections:
About Preparing Your Integrated Excel Workbooks
Having developed the Fusion web application, you integrate the Excel workbook with the Fusion web application.
This chapter describes the tasks that you perform to integrate an Excel workbook with the Fusion web application. The subsequent chapters of the guide enable you to configure the integrated workbook with Oracle ADF components that provide the functionality you require at runtime.
This chapter (and the guide as a whole) assumes that you have developed a functioning Fusion web application, as described in Introduction to Building Fusion Web Applications with Oracle ADF in Developing Fusion Web Applications with Oracle Application Development Framework.
Note:
Before you start, ensure that designer tools of ADF Desktop Integration are enabled, as described in Installing ADF Desktop Integration.
Working with Page Definition Files for an Integrated Excel Workbook
Page definition files define the bindings that populate the data in the Oracle ADF components at runtime. Page definition files also reference the action bindings and method action bindings that define the operations or actions to use on this data.
You must define a separate page definition file for each Excel worksheet that you are going to integrate with a Fusion web application.
The ADF Desktop Integration task pane displays only those bindings that ADF Desktop Integration supports in the bindings palette. If a page definition file references a binding that ADF Desktop Integration does not support (for example, a graph binding), it is not displayed.
Table 4-1 lists and describes the binding types that the ADF Desktop Integration module supports.
Table 4-1 Binding Requirements for ADF Desktop Integration Components
ADF Desktop Integration component | Supported Binding | Additional comments |
---|---|---|
ADF Input Text |
Attribute binding |
|
ADF Output Text |
Attribute binding |
|
ADF Label |
Attribute and list bindings |
This ADF Desktop Integration component uses the label property of a control binding. |
ADF List of Values |
List binding |
|
ADF Read-only Table |
Tree binding |
|
ADF Table |
Tree binding |
For information about the bindings that components in ADF Desktop Integration use, see ADF Desktop Integration Component Properties and Actions.
For information about the elements and attributes in page definition files, see pageNamePageDef.xml in Developing Fusion Web Applications with Oracle Application Development Framework.
For information about ADF data binding and page definition files in a Fusion web application, see Using ADF Model in a Fusion Web Application in Developing Fusion Web Applications with Oracle Application Development Framework.
How to Create ADF Desktop Integration Page Definition File
You create and configure a page definition file that determines the Oracle ADF bindings to expose in the JDeveloper project.
Before you begin:
It may be helpful to have an understanding of page definition files. See Working with Page Definition Files for an Integrated Excel Workbook.
To create an ADF Desktop Integration page definition file:
JDeveloper adds the page definition into the Fusion web application and opens the new page definition's editor. Figure 4-2 shows the ViewController project with the new page definition in the Applications window.
Figure 4-2 adfdiPageDefn.xml in Applications window

For information about working with page definition files, see Working with Page Definition Files in Developing Fusion Web Applications with Oracle Application Development Framework.
What Happens When You Create a Page Definition File
JDeveloper creates the DataBindings.cpx
file the first time you add a page definition file in the JDeveloper project using the procedure described in How to Create ADF Desktop Integration Page Definition File.
The DataBindings.cpx
file defines the binding context for the Fusion web application and provides the configuration from which the Oracle ADF bindings are created at runtime. Information about working with this file can be found in Working with the DataBindings.cpx File of Developing Fusion Web Applications with Oracle Application Development Framework.
How to Reload a Page Definition File in an Excel Workbook
If you make changes in your JDeveloper desktop integration project to a page definition file that is associated with an Excel worksheet, rebuild the JDeveloper desktop integration project and reload the page definition file in the Excel worksheet to ensure that the changes appear in the ADF Desktop Integration task pane. You associate a page definition file with an Excel worksheet when you choose the page definition file, as described in How to Configure a New Integrated Excel Workbook.
The Oracle ADF tab provides a button (Refresh Bindings) that reloads all page definition files in an Excel workbook. For information about the Refresh Bindings button, see About Development Tools.
Errors may occur when you switch an integrated Excel workbook from design mode to runtime if you do not rebuild the JDeveloper desktop integration project and restart the application after making changes to a page definition file. For example, if you:
-
Remove an element in a page definition file
-
Do not rebuild and restart the Fusion web application
-
Or do not reload the page definition file in the integrated Excel workbook
an error message such as the following may appear when you attempt to switch a workbook to test mode:
[ADFDI-05530] unable to initialize worksheet: MyWorksheet [ADFDI-05517] unable to find control MyBindingThatWasRemoved
Before you begin:
It may be helpful to have an understanding of page definition files. See Working with Page Definition Files for an Integrated Excel Workbook.
To reload page definition files in an Excel workbook:
- Ensure that you have saved the updated page definition file in JDeveloper.
- In the Excel workbook, click the Refresh Bindings button in the Components group of the Oracle ADF tab.
After reloading the page definition file, the ADF Desktop Integration task pane of the worksheet displays the same bindings that are available in its associated page of the Fusion web application. For example, Figure 4-3 shows the bindings in the ExcelCustomers.xml
page definition file and the same bindings in the worksheet of the EditCustomers-DT.xlsx
workbook.
Figure 4-3 Page Definition Bindings in JDeveloper and Integrated Excel Workbook

What You May Need to Know About Page Definition Files in an Integrated Excel Workbook
Note the following points about page definition files in an ADF Desktop Integration project:
-
Integrating Multiple Excel Worksheets: You can integrate multiple worksheets in an Excel workbook with a Fusion web application. You associate a separate page definition file with each worksheet as described in How to Add Additional Worksheets to an Integrated Excel Workbook.
-
EL Expressions in a Page Definition File: Use the following syntax to write EL expressions in a page definition file:
Dynamic (${})
Do not use the syntax
Deferred (#{})
to write EL expressions. EL expressions using this syntax generate errors because they attempt to access the ADF Faces context, which is not available.Note:
EL expressions that you write for ADF Desktop Integration component in the integrated Excel workbook, such as the Input Text component, must use the
Deferred (#{})
syntax.
Adding an Integrated Excel Workbook to a Fusion Web Application
The Fusion web application is automatically enabled with ADF Desktop Integration when you add an integrated Excel workbook to a project. An integrated Excel workbook enables you to add ADF components and ADF data bindings.
How to Add an Integrated Excel Workbook to a Fusion Web Application
To add an integrated Excel workbook, open the Fusion web application in JDeveloper and add an Excel workbook to the project from New Gallery.
Before you begin:
It may be helpful to have an understanding of adding ADF Desktop Integration to a Fusion web application. See Adding an Integrated Excel Workbook to a Fusion Web Application.
To add an integrated Excel workbook in JDeveloper:
JDeveloper adds the integrated Excel workbook into the Fusion web application, and automatically enables the project with ADF Desktop Integration. Figure 4-5 shows the ViewController project.
Figure 4-5 adfdi-workbook-DT.xlsx in Applications window

Description of "Figure 4-5 adfdi-workbook-DT.xlsx in Applications window"
How to Configure a New Integrated Excel Workbook
After adding the integrated Excel workbook, you must configure it.
Before you begin:
It may be helpful to have an understanding of adding an integrated Excel workbook to a Fusion web application. See Adding an Integrated Excel Workbook to a Fusion Web Application.
To configure a new integrated Excel workbook:
How to Add Additional Worksheets to an Integrated Excel Workbook
To use Oracle ADF functionality, associate each worksheet with a page definition file. You associate a page definition file with a worksheet when you add a worksheet to the integrated Excel workbook. You can integrate multiple worksheets in an integrated Excel workbook with a Fusion web application. Use a different page definition file for each worksheet in the integrated Excel workbook.
Before you begin:
It may be helpful to have an understanding of adding an integrated Excel workbook to a Fusion web application. See Adding an Integrated Excel Workbook to a Fusion Web Application.
To associate a page definition file with an Excel worksheet:
Enabling ADF Desktop Integration in an Excel Workbook
ADF Desktop Integration automatically configures integrated Excel workbooks that you create by adding to a Fusion web application with desktop integration functionality. You must enable desktop integration functionality in a pre-existing workbook to make it an integrated Excel workbook and configure properties in the newly-integrated Excel workbook.
See Adding an Integrated Excel Workbook to a Fusion Web Application.
How to Enable ADF Desktop Integration in an Existing Workbook
To integrate an existing workbook with the ADF Desktop Integration enabled Fusion web application, you must manually enable ADF Desktop Integration for the workbook. For information about the supported file formats of Excel workbooks that you can use for integration with a Fusion web application, see Required Oracle ADF Modules and Third-Party Software.
Before you begin:
It may be helpful to have an understanding of adding integrated Excel workbook to a Fusion web application. See Adding an Integrated Excel Workbook to a Fusion Web Application.
To enable ADF Desktop Integration in an existing Excel workbook:
Although you can store the Excel workbooks that you integrate with Fusion web applications anywhere you choose, there are several advantages to storing them with the other files of the Fusion web application. Some of these advantages are:
-
Source control of the workbooks
-
Facilitating the download of workbooks from web pages
-
The file system folder picker that appears the first time a workbook is opened defaults to the location where you store the workbook
For example, the Summit sample application for ADF Desktop Integration stores the Excel workbooks it integrates in the following subdirectory:
Summit_HOME
\ViewController\src\oracle\summitdi\excel
where Summit_HOME
is the root directory that stores the source files for the Summit sample application for ADF Desktop Integration.
How to Manually Configure a New Integrated Excel Workbook
After enabling ADF Desktop Integration manually in a workbook, you would need to configure it.
Before you begin:
It may be helpful to have an understanding of adding an integrated Excel workbook to a Fusion web application. See Enabling ADF Desktop Integration Manually.
To manually configure a new integrated Excel workbook:
Enabling ADF Desktop Integration Manually
To enable ADF Desktop Integration in the Fusion web application without adding the integrated Excel workbook, you must add ADF Desktop Integration manually.
How to Manually Add ADF Desktop Integration In Fusion Web Application
Use the Project Properties dialog in JDeveloper to add ADF Desktop Integration to the feature list of your project.
Before you begin:
It may be helpful to have an understanding of adding ADF Desktop Integration to a Fusion web application. See Enabling ADF Desktop Integration Manually.
To manually add ADF Desktop Integration to your project:
For information about what happens when you add ADF Desktop Integration, see What Happens When You Add ADF Desktop Integration to Your JDeveloper Project.
Note:
If you plan to distribute integrated Excel workbooks by adding them to ADF library files through EAR and JAR files, add ADF Library Web Application Support to your project. See Adding ADF Library Web Application Support.
What Happens When You Add ADF Desktop Integration to Your JDeveloper Project
When you add the ADF Desktop Integration feature to a project, the following events occur:
-
The project adds the ADF Desktop Integration Runtime library. This library references the following
.jar
files in its class path:-
adf-desktop-integration.jar
-
adf-desktop-integration-model-api.jar
-
resourcebundle.jar
-
-
The project's deployment descriptor (
web.xml
) is modified to include the following entries:-
An ADF bindings filter (
adfBindings
) -
A servlet named
adfdiRemote
Note:
The value for the
url-pattern
attribute of theservlet-mapping
element foradfdiRemote
must match the value of theRemoteServletPath
workbook property described in Table A-19. -
A filter named
adfdiExcelDownload
-
A MIME mapping for Excel files (
.xlsx
and.xlsm
)
The previous list is not exhaustive. Adding ADF Desktop Integration to a project makes other changes to
web.xml
. Note that some entries inweb.xml
are added only if they do not already appear in the file. -
Adding ADF Library Web Application Support
If you want to distribute integrated workbooks by adding them to ADF library files, add ADF Library web application support to the Fusion web application. See Packaging a Reusable ADF Component into an ADF Library in Developing Fusion Web Applications with Oracle Application Development Framework.
When updating filter and filter mapping information in the web.xml
file, ensure that the filter for ADF Library Web Application Support (<filter-name>ADFLibraryFilter</filter-name>
) appears below the adfdiExcelDownload
filter entries, so that integrated Excel workbooks can be downloaded from the Fusion web application.
Figure 4-13 shows the Filters tab of the overview editor of the web.xml
in JDeveloper.
You should also update the include-extension-list
initialization parameter to add the Excel file extensions (such as .xlsx
and .xlsm
), as shown in Figure 4-14.
Figure 4-14 ADFLibraryFilter Using include-extension-list
Parameter

Description of "Figure 4-14 ADFLibraryFilter Using include-extension-list Parameter"
For information about web.xml
, see ADF Desktop Integration Settings in the Web Application Deployment Descriptor.
Using an Integrated Excel Workbook with Older Versions of ADF Desktop Integration
Integrated Excel workbooks can be used with older versions of ADF Desktop Integration if the workbook does not contain features incompatible with the older version.
When you or your end users open an integrated Excel workbook created, or last updated, by a newer version of ADF Desktop Integration on a system running an older version of ADF Desktop Integration, a dialog appears if the integrated Excel workbook contains features that are incompatible with the older version of ADF Desktop Integration.
When you click OK on this dialog, ADF Desktop Integration disables the integrated Excel workbook and the end user cannot interact with the ADF Desktop Integration features in the workbook. The data in the workbook is not removed, but ADF Desktop Integration treats the workbook as a non-integrated workbook.
If the integrated Excel workbook does not contain incompatible features, no dialog appears and the workbook functions normally. For integrated Excel workbooks that contain incompatible features, upgrade the client version of ADF Desktop Integration, as described in Upgrading ADF Desktop Integration. End users can upgrade their client version, as described in How to Upgrade ADF Desktop Integration On a Local System.
Integrated Excel workbooks created using 12c (12.2.1) or earlier of ADF Desktop Integration do not have features that are incompatible with the ADF Desktop Integration 12c (12.2.1) client. A future release of ADF Desktop Integration may introduce features that will be incompatible with clients using 12c (12.2.1) or earlier of ADF Desktop Integration.
Note:
When the integrated Excel workbook is not compatible with the installed version of the ADF Desktop Integration client, a message is displayed when you open the workbook. In such a case, you should install the newer version of the ADF Desktop Integration client in order to interact with the newer workbook.