How to Publish an Integrated Excel Workbook Using the Command Line Publish Tool

14-2 Desktop Integration Developers Guide for Oracle Application Development Framework For information about using the setup.exe tool, see Section I.1, Installing the Runtime Edition of ADF Desktop Integration. For more information about Microsoft ClickOnce installer, see the following: http:msdn.microsoft.comen-uslibrary71baz9ah.aspx

14.3 Publishing Your Integrated Excel Workbook

After you finish configuring the Excel workbook with Oracle ADF functionality, you must publish it. Publishing a workbook makes it available to the end users for whom you configured the integrated Excel workbook. ADF Desktop Integration also provides you with two methods to publish your workbook. You can publish your integrated Excel workbook directly from Excel, or you can use the publish tool available in JDeveloper to publish the workbook from the command line. The command-line publish tool enables you to use ANT build scripts to publish an integrated Excel workbook from your Fusion web application.

14.3.1 How to Publish an Integrated Excel Workbook from Excel

You publish a workbook by clicking a button on the Oracle ADF tab and specifying values in the dialogs that appear, or by using the command-line publish tool. You can use the command line publish tool to publish a workbook from your Fusion web application. To publish a workbook from Excel: 1. Open the integrated Excel workbook. 2. Ensure that the ApplicationHomeFolder and WebPagesFolder properties in the Edit Workbook Properties dialog are correct. If these properties are not set, ADF Desktop Integration prompts you to set them when you publish the integrated Excel workbook. For more information, see Section 4.4.3, How to Configure a New Integrated Excel Workbook.

3. In the Oracle ADF tab, click the Publish button.

4. Specify the directory and file name for the published workbook in the Publish Workbook dialog that appears. The directory and file name that you specify for the published workbook must be different from the directory and file name for the design time workbook.

5. Click Save to save changes.

14.3.2 How to Publish an Integrated Excel Workbook Using the Command Line Publish Tool

The publish tool is run from the command line, and is available in the MW_ HOME \jdeveloper\adfdi\bin\excel\tools\publish directory as publish-workbook.exe. Before you run the publish tool, open the source integrated Excel workbook and ensure that the ApplicationHomeFolder and WebPagesFolder properties in the Edit Workbook Properties dialog are correct. Now, run the publish tool using the following syntax: publish-workbook -workbook -w source-workbook-path -out -o destination-workbook-path 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