Merge Worksheets

Merges selected data from any two worksheets into a new worksheet, following the order of the data in the first worksheet and combining rows with matched values, followed by the data from the second worksheet that has not already been merged in. Note that, because Merge retains the unmatched data, Merge is similar to an Outer Join, with the main difference being the order of the output.

Use one of the following to add the object to a Workflow:

Right-click menu for a Workflow object: New > Data Management > Merge Worksheets.
Main menu: Insert > Data Management > Merge Worksheets.
Right-click menu for a worksheet: Send To > Data Management > Merge Worksheets.

Note:To view the object in its own window, select it in the Object Browser and double-click it or press ENTER. All instructions for setting up and execution are the same whether the object is viewed in its own window or in Phoenix view.

Mappings panel

The Mappings panel allows users to specify which columns in a worksheet are involved in the work­sheet transformation. Required input is highlighted orange in the interface.

Sort: The variable(s) to match by when merging the worksheets.
Included Column: Variables mapped to this context are included in the output worksheet.

Sort Map panel

By default, the Merge Worksheets object requires that columns mapped to the Sort context have the same name. The Sort Map panel allows users to mix and match or override column names. For example, if the two columns being merged have different names, such as Subject and ID, the Sort Map panel can be used to specify matching columns in the two worksheets.

joinWorksheetsSortMap_1.png 

In this example, the Subject column in worksheet 1 is joined/merged to the ID column in worksheet 2, and the Conc column in worksheet 1 is joined/merged to the YObs column in worksheet 2.

Options tab

MergeWorksheetsOptstab.png 

Check the Carry Along Data For Like Sort Levels box to replicate data when the number of matched rows are not equal in the two worksheets. The Merge tool will combine the rows sequentially until it runs out of matched data in one of the worksheets (unlike the Cartesian join in the Join work­sheets object). Then it will either carry down the last available value from that worksheet, if the option is checked, or leave a blank cell for the worksheet that has run out of matched data, if the option is not checked.

Results

The Merge Worksheets object generates one worksheet and one text file.

Result: The merged worksheets.
Settings: Text file containing input worksheets used and the options selected.


Last modified date:7/9/20
Certara USA, Inc.
Legal Notice | Contact Certara
© 2020 Certara USA, Inc. All rights reserved.