15 Deploying Your Integrated Excel Workbook

Describes how to publish and deploy a workbook integrated with a Fusion web application to business users, how to pass parameters from the Fusion web application to the integrated Excel workbook, and how to integrate the ADF Workbook Composer into your Fusion web application.

This chapter includes the following sections:

About Deploying Your Integrated Excel Workbook

When you finish developing your integrated Excel workbook, make the final integrated Excel workbook available to business users by deploying the resulting Fusion web application to an application server.

Before you deploy a finalized Excel workbook that integrates with the Fusion web application, you must publish it as described in Publishing Your Integrated Excel Workbook. After you have published the Excel workbook, you can deploy it using one of the methods outlined in Deploying Fusion Web Applications of Developing Fusion Web Applications with Oracle Application Development Framework.

You should also make the ADF Desktop Integration add-in installers available to business users so that they can install the required version. For information, see Making ADF Desktop Integration Available to End Users.

The business users that you deploy an integrated Excel workbook to must install the ADF Desktop Integration add-in for Excel on their Windows-based computers.

Integrated Excel Workbook Deployment Use Cases and Examples

You use the Publish button of the Oracle ADF tab to save a published copy of the workbook. Figure 15-1 shows the Publish button and the Publish Workbook dialog that opens when you click the Publish button to save a copy of the integrated Excel workbook ready to be published and deployed with the Fusion web application.

Figure 15-1 Publish Workbook Dialog

Description of Figure 15-1 follows
Description of "Figure 15-1 Publish Workbook Dialog"

Additional Functionality for Deploying Your Integrated Excel Workbook

After you have published and deployed your integrated Excel workbook, you may find that you need to add additional functionality for your workbook. The following sections describe other functionality that you can use:

Making ADF Desktop Integration Available to Business Users

Business users who want to use the functionality that you configure in an integrated Excel workbook must install ADF Desktop Integration.

For information about how business users install ADF Desktop Integration, see How to Install ADF Desktop Integration on Your System.

For information about how to make the installer available to business users, see How to Install the ADF Desktop Integration Add-in From a Web Server.

Publishing Your Integrated Excel Workbook

After you finish configuring the Excel workbook with ADF Desktop Integration functionality, you must publish it. Publishing a workbook prepares the integrated Excel workbook for use by business users at runtime.

ADF Desktop Integration 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 scripts, such as an Ant script, to publish an integrated Excel workbook from your Fusion web application.

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.

Before you begin:

It may be helpful to have an understanding about how to publish your integrated Excel workbook. See Publishing Your Integrated Excel Workbook.

You may also find it helpful to understand the functionality that can be added using other ADF Desktop Integration features. See Additional Functionality for Deploying Your Integrated Excel Workbook.

For information configuring properties, such as the ApplicationHomeFolder and WebPagesFolder properties, see How to Configure a New Integrated Excel Workbook.

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 to set them when you publish the 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, as shown in Figure 15-1. 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.
    ADF Desktop Integration prompts you to save the workbook in the ViewController\public_html directory of the JDeveloper application workspace. Remove any suffixes, such as –DT, that may have been appended to the workbook when it was in design mode so that business users see a meaningful filename. For example, the Summit sample application publishes the workbook to edit customers using the EditCustomers.xlsx filename rather than EditCustomers-DT.xlsx filename that it used in design mode.
  5. Click Save to save changes.

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.

Note:

You cannot publish a workbook that is already published, or is in runtime mode.

Before you begin:

It may be helpful to have an understanding about how to publish your integrated Excel workbook. See Publishing Your Integrated Excel Workbook.

You may also find it helpful to understand the functionality that can be added using other ADF Desktop Integration features. See Additional Functionality for Deploying Your Integrated Excel Workbook.

Now, navigate to MW_HOME\jdeveloper\adfdi\bin\excel\tools\publish directory and run the publish tool using the following syntax:

publish-workbook -workbook (-w) <source-workbook-path> -out (-o) <destination-workbook-path>

where source-workbook-path is the full path of the source workbook, and destination-workbook-path is the full path where the published workbook is saved.

For example:

publish-workbook -workbook D:\Application1\Project1\ViewController\src\oracle\sampledemo\excel\workbook-DT.xlsx -out D:\Application1\Project1\ViewController\public_html\excel\published\workbook.xlsx

Tip:

For information about the arguments required by the publish tool, run the following command:

publish-workbook -help (-h)

Note:

  • Always specify the absolute paths of the source and destination workbooks. The publish tool does not support relative paths of the workbooks.

  • The destination workbook cannot have the same name as the source, even if the workbook paths are different.

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.

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.

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:

  1. Validates the mandatory workbook settings.

  2. Updates the client registry.

  3. Creates the published workbook with the specified file name in the specified directory.

    Publish also exports the workbook definition. The published workbook definition XML file is saved at the same location as the design-time copy of the workbook. For information about workbook definition, see Exporting and Importing Excel Workbook Integration Metadata.

  4. Clears the ApplicationHomeFolder, WebAppRoot, and WebPagesFolder properties from the workbook settings of the published workbook.

  5. Clears all design time component placeholders.

  6. Changes the mode of the workbook to runtime mode.

  7. Inserts a Publishing Timestamp property into the workbook. This property is visible in the Properties tab of About dialog.

Deploying a Published Workbook with Your Fusion Web Application

If you published your integrated Excel workbook, your Fusion web application automatically includes the published workbook when you deploy the web application. Otherwise, add the workbook to the JDeveloper project of 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 Summit sample application for ADF Desktop Integration stores the deployed Excel workbooks that it integrates at the following location:

<Summit_HOME>\ViewController\public_html\excel

where Summit_HOME is the installation directory for the Summit sample application for ADF Desktop Integration.

After you decide on a location to store your integrated Excel workbooks, you can configure web pages in your Fusion web application allowing business users to access the integrated Excel workbooks. For example, Figure 15-2 shows the downloaded workbook in a popup when the user clicks Download Workbook from the Edit Customers Sample tab of the Summit Sample Application for ADF Desktop Integration page.

Figure 15-2 Invoking an Integrated Excel Workbook from a Fusion Web Application

Description of Figure 15-2 follows
Description of "Figure 15-2 Invoking an Integrated Excel Workbook from a Fusion Web Application"

To enable the functionality illustrated in Figure 15-2, the HTTP filter parameters for your Fusion web application must be configured to recognize Excel workbooks. JDeveloper automatically configures these parameters for you when ADF Desktop Integration is enabled in the Fusion web application. If you want to manually configure the HTTP filter parameters, see 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 business 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 ADF code in a web page:

<af:link text="Editable Table Sample" destination="/excel/EditCustomers.xlsx"/>

where excel is a subdirectory of the directory specified by the WebPagesFolder workbook property and EditCustomers.xlsx is the Excel workbook that the business user invokes.

You can provide functionality that allows business users to download integrated Excel workbooks from web page buttons and menus. The following list provides some examples:

  • Button

    Display a button on the web page that, when clicked, invokes the integrated Excel workbook. For example, the Download Workbook button in Figure 15-2 is a button component that the MainPage.jsf page exposes.

  • Selection list

    Use the ADF Faces selectOneChoice component with a button to invoke an integrated Excel workbook.

  • Menu

    Use the ADF Faces goMenuItem component.

For information about creating web pages for a Fusion web application, see Getting Started with ADF Faces and JDeveloper in Developing Web User Interfaces with Oracle ADF Faces.

What Happens When You Deploy an ADF Desktop Integration-Enabled Fusion Web Application from JDeveloper

When you deploy the ADF Desktop Integration-enabled Fusion web application from JDeveloper, references to the ADF Desktop Integration shared libraries are added to the appropriate descriptor files. For any Fusion web application that contains one or more projects referencing the ADF Desktop Integration Model API library or the ADF Desktop Integration Runtime library, a platform-dependent reference to the ADF Desktop Integration Model API shared library is added during deployment.

For any web application module (WAR) project that contains a reference to the ADF Desktop Integration Runtime library, a platform-dependent reference to the ADF Desktop Integration Runtime shared library is added during deployment.

Fusion Web Application is Deployed on Oracle WebLogic Server

When you deploy the Fusion web application on Oracle WebLogic Server, the following happens:

  • The META-INF/weblogic-application.xml file of the deployed application EAR file contains a library reference to oracle.adf.desktopintegration.model.

    For example:

    <library-ref>
      <library-name>oracle.adf.desktopintegration.model</library-name>
    </library-ref>
    

    The shared library is delivered in MW_HOME/oracle_common/modules/oracle.adf.desktopintegration.model, in the oracle.adf.desktopintegration.model.ear file.

  • The WEB-INF/weblogic.xml file of the deployed web application WAR file contains a library reference to oracle.adf.desktopintegration.

    For example:

    <library-ref>
      <library-name>oracle.adf.desktopintegration</library-name>
    </library-ref>
    

    The shared library is delivered in MW_HOME/oracle_common/modules/oracle.adf.desktopintegration, in the oracle.adf.desktopintegration.war file.

What Happens at Runtime: Business User Requests a Published Workbook

When web.xml is configured for a Fusion web application that uses ADF Desktop Integration,

The following events occur when you configure a Fusion web application to use ADF Desktop Integration:

  • The DIExcelDownloadFilter filter is defined.

  • Filter mappings are defined for *.xlsx and *.xlsm files.

At runtime, when the business user makes an http request for a workbook (for example, user clicks a link in a web page from the application), the DIExcelDownloadFilter filter embeds the WebAppRoot property into the workbook as it gets streamed back as the http response. The WebAppRoot property is later used by the ADF Desktop Integration add-in to connect to the Fusion web application, establish a user session, and send data back and forth. Parameter values can also be passed from the web application to the workbook, as described in Passing Parameter Values from a Fusion Web Application Page to a Workbook.

The DIExcelDownloadFilter filter constructs the WebAppRoot value from the current HttpServletRequest object that is passed in to the doFilter() entry point. The filter code calls HttpServletRequest.getRequestURL()and gets the "root" portion of the full URL by removing everything after the context path portion (uses HttpServletRequest.getContextPath()).

Passing Parameter Values from a Fusion Web Application Page to a Workbook

A Fusion web application page can be configured to pass parameter values to an integrated Excel workbook when the business user downloads the workbook from the page.

Workbook parameters can be used to pass context from the user's web page to the integrated workbook. The passed context may be sent back to the web application from the integrated workbook to affect application state (for example, what data renders in the workbook). The Summit sample application, for example, displays a list of warehouses to the business user, as shown in Figure 15-3. When a business user clicks a Download Workbook button, the Summit sample application passes the value of the WarehouseID parameter to the workbook to download. The passed WarehouseID parameter controls which warehouse's data renders in the worksheet for editing.

Figure 15-3 Downloading Workbooks According to Parameter Value

This image is described in the surrounding text

To pass parameters from the Fusion web application page to the integrated Excel workbook, follow these steps:

  1. Verify that the HTTP filter is configured to allow business users to download integrated Excel workbooks from the Fusion web application. By default, JDeveloper configures the HTTP filter with appropriate values when you enable ADF Desktop Integration in a project. To verify the parameter values of the HTTP filter, see Configuring the ADF Desktop Integration Excel Download Filter .

  2. Use Name/Value pairs as URL arguments in the web page of the Fusion web application that allows the business user to download the workbook. See How to Configure the Fusion Web Application's Page to Pass Parameters.

    Note:

    The runtime URL-encoded value of the entire query string to the right of ? must be less than 2048 bytes. If the runtime value exceeds 2048 bytes, the integrated Excel workbook will contain only the URL arguments that fit in 2048 bytes. Subsequent URL arguments do not get included with the integrated Excel workbook. Instead, the Fusion web application writes log entries for these URL arguments identifying them as having not been included.

    For example, the total size of the string result to the right of ? when the following EL expression is evaluated and then URL-encoded must be less than 2048 bytes.

    "/excel/EditWarehouseInventory.xlsx?WarehouseId=#{item.bindings.Id.inputValue}"

    If you need to pass information that exceeds this limit, consider storing it temporarily in a (custom) database table and only pass a unique token to look up that information later. This technique also protects the context information from undesirable exposure.

  3. Define the parameter name in the Edit Workbook Properties dialog and in the Edit Worksheet Properties dialog. See How to Configure Parameters Properties in the Integrated Excel Workbook.

  4. Configure the page definition file associated with the worksheet in the integrated Excel workbook by adding <parameter> elements. See How to Configure the Page Definition File for the Worksheet to Receive Parameters.

Figure 15-4 Illustrates the steps implemented in the Summit sample application to pass a parameter from the web application to the EditWarehouseInventory-DT.xlsx workbook. For information about the Summit sample application, see Introduction to the ADF Desktop Integration Sample Application.

Figure 15-4 Configuring Workbook and Fusion Web Application to Pass Parameters

Description of Figure 15-4 follows
Description of "Figure 15-4 Configuring Workbook and Fusion Web Application to Pass Parameters"

How to Configure the Fusion Web Application's Page to Pass Parameters

A component, such as <af:button>, can be used to allow business users to download a published copy of an integrated workbook. The component's destination URL references the integrated workbook, and in its query portion, the URL parameter names and values correspond to the workbook's parameter names and values. You also specify the commands on the page that, when invoked, require the Fusion web application to refresh the values referenced by the component and its property values.

For information about downloading files using action components, see How to Use an Action Component to Download Files in Developing Web User Interfaces with Oracle ADF Faces.

Before you begin:

It may be helpful to have an understanding of how to pass parameter values from the Fusion web application to the integrated Excel workbook. See Passing Parameter Values from a Fusion Web Application Page to a Workbook.

You may also find it helpful to understand the functionality that can be added using other ADF Desktop Integration features. See Additional Functionality for Deploying Your Integrated Excel Workbook.

To configure the page in the Fusion web application:

  1. In JDeveloper, insert the component or tag (such as af:button ) into the page from which the business user downloads the integrated Excel workbook.
  2. In the Structure window, right-click the component and choose Go to Properties.
  3. Expand the Common section and set values for the properties.

    Table 15-1 describes the properties of af:button component.

    Table 15-1 Properties for af:button Tag

    Property Value

    Text

    Write the text that appears to business users at runtime.

    For example, write text such as the following to appear at runtime:

    Download Workbook

    Destination

    Invoke the expression builder to write an EL expression that specifies the integrated Excel workbook and the values to download as a URL argument:

    For example, write an EL expression such as the following:

    destination="/excel/EditWarehouseInventory.xlsx?WarehouseId=
    #{item.bindings.Id.inputValue}"

    Per RFC3986, URL argument names and values must not contain any reserved characters, for example: #, ?, and &. You may find it necessary to use a Java bean method to retrieve the values of binding container attributes when using them as URL argument values. The bean method can URL-encode the values so that the URL conforms to the specification. See Java’s java.net.URLEncoder class for more details about URL encoding.

  4. (Optional) Expand the Behavior section and specify component IDs for the partialTriggers property that, when invoked, update the values of the af:button tag and its Destination property.

    For example, if you have navigation buttons with the IDs NextButton, PreviousButton, FirstButton, and LastButton, specify them as follows:

    :NextButton :PreviousButton :FirstButton :LastButton

  5. Save the page.

    The following example shows the entries that JDeveloper generates in a JSF page using the required examples in this procedure:

    <af:button text="Download Workbook" id="b2"
                        destination="/excel/EditWarehouseInventory.xlsx
                                   ?WarehouseId=#{item.bindings.Id.inputValue}"/>
    

How to Configure Parameters Properties in the Integrated Excel Workbook

You configure the workbook Parameters property and the worksheet Parameters property so that the integrated Excel workbook that the business user downloads from the Fusion web application receives parameter values included in the query string of the workbook download URL.

Before you begin:

It may be helpful to have an understanding of how to pass parameter values from the Fusion web application to the integrated Excel workbook. See Passing Parameter Values from a Fusion Web Application Page to a Workbook.

You may also find it helpful to understand the functionality that can be added using other ADF Desktop Integration features. See Additional Functionality for Deploying Your Integrated Excel Workbook.

To configure the workbook Parameters property:

  1. Open the integrated Excel workbook.

  2. In the Workbook group of the Oracle ADF tab, click Workbook Properties.

  3. Click the browse (...) icon beside the input field for Parameters to invoke the Edit Parameters dialog.

  4. Click Add to add a new workbook parameter and configure its properties as follows:

    • In the Parameter field, define the parameter name that you plan to use as a URL argument for the af:button tag's Destination property and later bind to a page definition parameter, as described in How to Configure the Fusion Web Application's Page to Pass Parameters.

      For example, the EditWarehouseInventory-DT.xlsx workbook defines the WarehouseID parameter value, as illustrated in Figure 15-5.

      Tip:

      Make sure that the value you define will be valid for use in a standard URL query string. The parameter name you use should be a simple identifier so that it functions properly when referenced in EL expressions.

      Figure 15-5 Workbook Parameters

      This image is described in the surrounding text
    • (Optional) In the Annotation field, enter a description of the workbook parameter.

  5. Repeat Step 4 as necessary to add other workbook parameters.

  6. Click OK.

    For information about the workbook Parameters property, see Table 17-17.

To configure the worksheet Parameters property:

  1. Open the integrated Excel workbook.

  2. In the Workbook group of the Oracle ADF tab, click Worksheet Properties.

  3. Click the browse (...) icon beside the input field for Parameters to invoke the Edit Parameters dialog.

  4. Click Add to add a new worksheet parameter and configure it, as illustrated in Figure 15-6 from the EditWarehouseInventory-DT.xlsx workbook:

    • In the Parameter field, specify a parameter element that you added to the page definition file associated with the worksheet, as described in How to Configure the Page Definition File for the Worksheet to Receive Parameters.

    • In the Value field, write an EL expression that references the value of the Parameter property you specified for the workbook parameter (workbook Parameters array). Use the following syntax when writing the EL expression:

      #{workbook.params.parameter}

      where parameter references the value of the Parameter property you specified for the workbook parameter.

    • (Optional) In the Annotation field, enter a description of the worksheet parameter.

    Figure 15-6 Worksheet Parameters

    This image is described in the surrounding text
  5. Repeat Step 4 as necessary to add other workbook parameters.

  6. Click OK.

    For information about the worksheet Parameters property, see Table 17-18.

For use cases where the workbook parameter values are necessary to set up the initial server state on each new user session, set the SendParameters property to True. Additionally, you should specify a method action binding to invoke for the worksheet's SetupActionID that initializes the server state using the workbook parameter values.

To configure the worksheet SendParameters and SetupActionID properties:

  1. Open the integrated Excel workbook.
  2. In the Workbook group of the Oracle ADF tab, click Worksheet Properties.
  3. In the Edit Worksheet Properties dialog, set the values of SendParameters and SetupActionID as shown in the Table 15-2 and Figure 15-7:

    Table 15-2 SendParameters and SetupActionID Properties

    Set this property to... This value...

    SendParameters

    True to make sure that the worksheet parameters are set in the binding container for the worksheet. When set to True, parameters are sent every time when the metadata is requested and the first time when data is requested, during each user session. When set to False (the default value), the explicit sending of worksheet parameters does not take place.

    SetupActionID

    Specify a method action binding to invoke that initializes the server state using the workbook parameter values.

    See Using Explicit Worksheet Setup Action.

    Figure 15-7 SendParameters and SetupActionID Properties

    This image is described in the surrounding text
  4. Click OK.

When entering the Test mode, the Workbook Parameter dialog prompts you to enter test parameter values. Figure 15-8 shows the Workbook Parameters dialog that accepts test values for the workbook in an input field.

Figure 15-8 Workbook Parameters dialog

This image is described in the surrounding text

While testing, the values entered here are used for the workbook parameter values. If you have bound the workbook parameters to page definition parameters in the worksheet, the values you enter here will be sent to the binding container. You are not required to enter values for any, or all, parameters. If you enter test parameter values, they are not cleared when you exit the test mode and return to design mode. When you run the integrated Excel workbook again, the workbook parameter values are displayed in the Workbook Parameters dialog from the cache.

The provided test values are stored in the workbook in the same way as the ADF Desktop Integration Excel download filter stores the parameter values. When you publish the workbook, the test parameter values are cleared before the workbook is published.

Note:

In the above example from the EditWarehouseInventory-DT.xlsx workbook, the FilterWarehouseMasterById method action can be used as the worksheet's setup action (SetupActionID). This causes the method to be called automatically when the worksheet is initialized at runtime (or whenever a new instance of the worksheet's binding container is created). For information about SetupActionID, see Using Explicit Worksheet Setup Action.

The same method action could also be configured as a part of an action set, such as one for a ribbon command or Startup event, depending on the use case. In the case of a ribbon command, its execution will be triggered by the business user. For information about ribbon commands and Startup event, see How to Configure a Worksheet Ribbon Command for the Runtime Ribbon Tab and How to Invoke an Action Set from a Worksheet Event.

Workbook parameter values can be used as arguments for any method exposed by the page definition.

How to Configure the Page Definition File for the Worksheet to Receive Parameters

The page definition file associated with the worksheet in the integrated Excel workbook can be configured as follows:

  • Add one or more parameter elements that initialize the worksheet's binding container. The values for these parameters will be supplied from URL arguments, as specified in How to Configure the Fusion Web Application's Page to Pass Parameters.

    The following example shows the WarehouseIdParam parameter defined in the ExcelWarehouseInventory.xml page definition file that is associated with the EditWarehouseInventory-DT.xlsx workbook:

    <parameters>
            <parameter id="WarehouseIdParam" value="value"/>
        </parameters>
    
  • Add a method action binding that invokes an application module method. The following example shows an implementation in the ExcelWarehouseInventory.xml page definition file that is associated with the EditWarehouseInventory-DT.xlsx workbook.

    <methodAction id="FilterWarehouseMasterById" RequiresUpdateModel="true"
         Action="invokeMethod" MethodName="FilterWarehouseMasterById"
         IsViewObjectMethod="false" DataControl="SummitAppModuleDataControl"
         InstanceName="data.SummitAppModuleDataControl.dataProvider">
      <NamedData NDName="warehouseId" NDValue="${bindings.WarehouseIdParam}"
         NDType="java.lang.String"/>
    </methodAction>
    

For information about configuring a page definition file, see Working with Page Definition Files for an Integrated Excel Workbook and Working with Page Definition Files in Developing Fusion Web Applications with Oracle Application Development Framework.

What Happens at Runtime: How Parameters Are Passed from a Fusion Web Application to the Integrated Excel Workbook

When the business user downloads the integrated Excel workbook from the Fusion web application, the component tag that triggered the download (such as af:button tag) is evaluated, the current parameter value (for example, warehouseID) is captured and included on the URL. The adfdiExcelDownload filter embeds the names and values of all the parameters from the URL into the downloaded integrated Excel workbook.

The parameters are set into BindingContainer DCParameters before the binding container is refreshed. For information about how worksheet parameters are mapped to binding containers, see How to Configure the Page Definition File for the Worksheet to Receive Parameters.

For use cases where workbook parameter values are necessary to set up the initial server state on each new user session, set the Worksheet.ServerContext.SendParameters property to True. Additionally, you should specify a method action binding to invoke for the worksheet's SetupActionID that initializes the server state using the workbook parameter values. For information about the worksheet SetupActionID property, see Using Explicit Worksheet Setup Action.

In the EditWarehouseInventory.xlsx workbook, the FilterWarehouseMasterById method is invoked on each user session to set up the correct server state using the workbook WarehouseId parameter value stored in the downloaded workbook.

To reset the initialization state for all worksheets in the workbook, invoke the ClearAllData action. For information about the ClearAllData action, see Table 17-16.