Create Multiple Named Ranges in an Excel Object Print Area
You can create multiple named ranges in the print area of an Excel object in CDM. When you select a range of cells in an Excel report object worksheet and name it as a print area, you can create one or more named ranges and then use them to import the information in those ranges into a Word object.
The ability to use named ranges is useful when you have a range of information that would normally require a separate variable for each cell value in the Excel object.
You can define multiple named ranges in a print area on each worksheet in an Excel report object by giving each a unique name. You can also add the same markers as you would for the ##RS and ##RE variables (in effect, ##NR, ##NL, ##SR, ##SL, +, - and cell padding). Formatting of content within the print area is maintained when the named range variables are inserted into a Word object.
To create multiple named ranges in an Excel object print area:
- Open the report that you want to work with.
- Open and check out the Excel object in which you want to create a print area named range.
- Click the Section View Mode icon in the status bar.
- In the data worksheet, select one or more cell ranges that you want to define as a print area named range. The data worksheet is originally named Sheet1, but you can rename it if necessary.
- To define the print area, select Page Layout > Print Area> Set Print Area.
- To add an additional cell range to the print area, select another cell range and select Page Layout > Print Area > Add to Print Area.
- To create a named range, select a cell range within the print area and give it a unique name, such as NamedRange01.
- Continue selecting cell ranges within the print area and naming them to create additional named ranges.
- Save your changes in the source Excel object.
- Click the Default View Mode icon in the status bar.
- Save your changes to the report and check in the source Excel object.
You can now use the multiple named ranges within the print area in a Word object to import the information in their ranges into a worksheet.