Spreadsheet.MergeVariables
This function merges the spreadsheet variables with the variables of the specified file.
SVB Example
Merging spreadsheets by variables:
Option Base 1
Option Explicit
Sub Main
Dim spr As Spreadsheet
'opens the spreadsheet smoking2.sta and assigns it to the object spr
Set spr = Spreadsheets.Open(Path & "\examples\datasets\smoking2.sta")
spr.Visible = True
'merges the file smoking3 with the smoking 2
'performs a non-relational merge
'deletes unmatched cases
'merges based on text
'variable 1 is the key in both spreadsheets
spr.MergeVariables(Path & "\examples\datasets\smoking3.sta", _
scMergeNotRelational, _
scMergeDelete,1,1,scMergeText)
End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.
