Adding and Embedding Available Content from Reference Files

Once you have defined named ranges in your Excel reference file, you can specify ranges as available content, and then instantly embed that content in your doclet using the procedure in this topic (bypassing the two-part procedure described in Registering Reference Files with a Doclet and Embedding Reference File Content in a Doclet).

In this topic, we are going to add available content from the Excel file we used in Registering Reference Files with a Doclet. In that scenario, we added one named range as available content. However, in that Excel file, there were four other named ranges that could be added as available content. In this procedure, we'll add named ranges from that Excel reference file as available content and then embed them.

The process described in this topic is the same whether you are embedding content into a Word or a PowerPoint doclet.

To add content from a reference file to a doclet and then embed it:

  1. Open the report package, and then open and check out the doclet.

    Note:

    Be sure to position your cursor at the point where you want to insert the embedded content that you will be working with in this procedure.

  2. In the Narrative Reporting ribbon, click the Embed button to launch the Embed Contents dialog box.

    Figure 23-30 shows one available content, "Actual," sourced from the reference file, Current Data.xlsx.

    Optionally, click the Show Preview button to view a preview of the selected available content, as described in Previewing Available Content.

    Figure 23-30 Embed Contents Dialog Box


    The Embed Contents dialog box, showing one named range available for embedding.
  3. Click The Add available content button in the Embed Contents dialog to launch the Embed New Content dialog.
  4. In Embed New Content, click the drop-down menu in the Source field and select an option, as shown in Figure 23-31.
    • Local File—After selecting Local File, click The Choose File button, browse to the location of the Excel file that you plan to use as a reference file, and then select the file.
    • A reference file—If you want to add more available content from a previously registered reference file in the list, select the file from the Source drop-down menu.

    Figure 23-31 Embed New Content Dialog Box


    The Embed New Content dialog box, showing the drop-down menu in the Source field, where you select Local File the first time you add a reference file to a doclet or select a reference file that is already in the list

    With either selection, the list of ranges that can be selected for available content is displayed under Source Objects.

    For the example in this topic, we'll select the Current Data.xlsx file that was using previously in Registering Reference Files with a Doclet and Embedding Reference File Content in a Doclet, and now lists four ranges under Source Objects that can be added as available content, as shown in Figure 23-31 in the next step.

  5. In the Embed New Content dialog, click the source object name (not the check box) that you want to embed in the doclet.

    Tip:

    Select only one object.

    In Figure 23-32, the source object named "All" is clicked and the check box is selected.

    Figure 23-32 Embed New Content Dialog Box with a Named Range Selected


    The Embed New Content dialog box with a named range selected.
  6. Click OK to embed the selected content into the doclet.

    The example in Figure 23-33 shows an Excel table embedded into a Word doclet.

    Figure 23-33 Content from Reference File Embedded in Word Doclet

    Example of an Excel table from a reference file embedded into a Word doclet
  7. Optional: Select an embedded content on the doclet to view its available content name, as described in Viewing Available Content Name in Doclets.
  8. Optional: Repeat this procedure, starting at step 2 for each additional available content from a refererence file that you want to embed.
  9. When finished, upload the doclet and check it in.