Use a Report Object Variable to Create a Named Range in an Excel Object
You can use a named range in an Excel object in CDM. When you use source and destination report object variables, you can create a named range in the worksheet of an Excel object and then use it to import the information in that range into a worksheet in another Excel object, or into a Word or PowerPoint object. You can also choose to include or exclude formatting.
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.
To use a report object variable to create a named range in an Excel object:
- Open the report that you want to work with.
- Open and check out the Excel object in which you want to use a named range.
- Click the Section View Mode icon in the status bar.
- In the data worksheet, select the cell range that you want to define as a named range. The data worksheet is originally named Sheet1, but you can rename it if necessary.
- Click Formulas, then Define Name. The New Name window opens.
- Type the name of the range in the Name field, for example, AssetsRange, and click OK.
- In the same data worksheet where you added the named range, create a source object variable (
##S) that tags the range. Set up the source variable in two columns:- In the first column, enter the ##S variable as an identifier.
- In the second column, enter the name you used for the range you created, for example, AssetsRange.
Important: Ensure that the variable name is outside of the display range, that is, not contained inside the
##RSand##REvariables. - 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 source named range variable to import the information in that range into a worksheet in another Excel object, or into a Word or PowerPoint object.