var list = new System.Collections.Generic.List<string>(); list.Add("Charlie"); list.Add("Delta"); list.Add("Echo"); var flatList = string.Join(",", list.ToArray());
var cell = (Microsoft.Office.Interop.Excel.Range)oSheet.Cells[row, 8]; cell.Validation.Delete(); cell.Validation.Add( XlDVType.xlValidateList, XlDVAlertStyle.xlValidAlertInformation, XlFormatConditionOperator.xlBetween, flatList, Type.Missing); cell.Validation.IgnoreBlank = true; cell.Validation.InCellDropdown = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)