ModelRelationships.Add(ModelTableColumn, ModelTableColumn) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a new relationship to the model.
public:
Microsoft::Office::Interop::Excel::ModelRelationship ^ Add(Microsoft::Office::Interop::Excel::ModelTableColumn ^ ForeignKeyColumn, Microsoft::Office::Interop::Excel::ModelTableColumn ^ PrimaryKeyColumn);
public Microsoft.Office.Interop.Excel.ModelRelationship Add (Microsoft.Office.Interop.Excel.ModelTableColumn ForeignKeyColumn, Microsoft.Office.Interop.Excel.ModelTableColumn PrimaryKeyColumn);
Public Function Add (ForeignKeyColumn As ModelTableColumn, PrimaryKeyColumn As ModelTableColumn) As ModelRelationship
Parameters
- ForeignKeyColumn
- ModelTableColumn
A ModelTableColumn object representing the foreign key column in the table on the many side of the one-to-many relationship.
- PrimaryKeyColumn
- ModelTableColumn
A ModelTableColumn object representing the primary key column in the table on the one side of the one-to-many relationship.