InitializeGroupComboBoxes ( Microsoft.Office.Interop.Excel.Workbook oWorkbook ) { Debug.Assert(oWorkbook != null); m_aoGroupSourceColumnNameComboBoxes = new GroupColumnComboBox[] { cbxGroupCollapsedSourceColumnName, cbxGroupLabelSourceColumnName, }; ListObject oGroupTable; if ( ExcelTableUtil.TryGetTable(oWorkbook, WorksheetNames.Groups, TableNames.Groups, out oGroupTable) ) { // Populate the group table column ComboBoxes with the source // column names. foreach (GroupColumnComboBox oComboBox in m_aoGroupSourceColumnNameComboBoxes) { oComboBox.PopulateWithTableColumnNames(oGroupTable); } } // Store the name of the column corresponding to the ComboBox in each // ComboBox's Tag. This gets used for error checking by // DoDataExchange(). cbxGroupCollapsedSourceColumnName.Tag = GroupTableColumnNames.Collapsed; cbxGroupLabelSourceColumnName.Tag = GroupTableColumnNames.Label; }