Deploying Your Integrated Excel Workbook 14-3
where source-workbook-path is the path of sthe ource workbook, and destination-workbook-path is the path where the published workbook is saved.
Note that the destination workbook cannot have the same name as the source, even if the directory locations are different.
For example: publish-workbook -workbook
D:\Application1\Project1\ViewController\src\oracle\foddemo\maste rpricelist\excel\workbook-src.xlsx -out
D:\Application1\Project1\ViewController\public_ html\excel\published\workbook.xlsx
After publishing the integrated Excel workbook successfully, the publish tool displays a success message. If there is any error while publishing the workbook, the publish
tool aborts the process and the error messages are displayed on the command line console.
If you are using the command line publish tool, note that by default the publish tool logs messages to the command line console at information level.
Using the Publish Tool with ANT You can create ANT scripts to run the publish tool from JDeveloper when you build
your Fusion web application. You can use either of the following methods to run the utility using ANT:
■
Generate an ANT build script for the project and add a target to run the workbook command line publish tool
■
Generate or create a separate ANT build script for running the workbook command line publish tool
A sample ANT build script publish-workbook.xml to run the publish tool is available in the MW_HOME\jdeveloper\adfdi\bin\excel\samples directory.
The sample ANT script demonstrates the invocation of the command-line workbook publishing tool.
14.3.3 What Happens When You Publish an Integrated Excel Workbook
When you click the Publish button in design mode, ADF Desktop Integration performs the following actions:
■
Removes binding expressions that are visible in the worksheet while the workbook is in design mode.
■
Changes the workbook mode to runtime mode.
■
Clears the ApplicationHomeFolder, WebAppRoot, and WebPagesFolder properties from the workbook settings of the published workbook.
■
Creates the published workbook with the file name you specified in the directory that you specified.
■
Updates the client registry. For more information, see Section 11.3, Checking the
Integrity of an Integrated Excel Workbook’s Metadata.
Tip: For more information about the arguments required by the
publish tool, run the following command: publish-workbook -help -h
14-4 Desktop Integration Developers Guide for Oracle Application Development Framework
14.4 Deploying a Published Workbook with Your Fusion Web Application
Add the integrated Excel workbook to the JDeveloper project for your Fusion web application if it is not packaged with the other files that constitute your JDeveloper
project. This makes sure that the Excel workbooks you integrate with your Fusion web application get deployed when you deploy your finalized Fusion web application. For
example, the Master Price List module stores the Excel workbooks that it integrates at the following location:
FOD_ HOME\MasterPriceList\ViewController\src\oracle\foddemo\masterpri
celist\excel\excel
where FOD_HOME is the installation directory for the Fusion Order Demo application. After you decide on a location to store your integrated Excel workbooks, you can
configure web pages in your Fusion web application allowing end users to access the integrated Excel workbooks. For example,
Figure 14–1 shows Internet Explorer’s File
Download dialog, which was invoked by clicking the Excel Edit Using Live Spreadsheet
menu options on the PriceListSummary.jspx page displayed by the Master Price List module.
Figure 14–1 Invoking an Integrated Excel Workbook from a Fusion Web Application
To enable the functionality illustrated in Figure 14–1
, the HTTP filter parameters for your Fusion web application must be configured to recognize Excel workbooks.
JDeveloper automatically configures these parameters for you when you add ADF Desktop Integration to the technology scope of your Fusion web application, as
explained in Section 4.2, Adding ADF Desktop Integration to a Fusion Web
Application. If you want to manually configure the HTTP filter parameters, see
Appendix E, ADF Desktop Integration Settings in the Web Application Deployment Descriptor.
After you have configured the HTTP filter for your Fusion web application, you configure the web pages that the Fusion web application displays to end users to allow
them to invoke Excel workbooks. A basic method of invoking an Excel workbook that you have integrated with a Fusion web application is to provide a hyperlink that
invokes the workbook. For example, you could write the following HTML in a web page: