//------------Creating drop down for the values of list-------------- string list = string.Join(",", ls.ToArray()); range.Validation.Delete(); range.Validation.Add(XlDVType.xlValidateList, XlDVAlertStyle.xlValidAlertInformation, XlFormattConditionOperator.xlBetween, list, Type.Missing); range.Validation.IgnoreBlank = true; range.Validation.InCellDropdown = true; //---------------looping through each value and creating hyperlink---------- foreach (object lst in ls) { Microsoft.Office.Interop.Excel.Hyperlink hyperlink = (Microsoft.Office.Interop.Excel.Hyperlink)range.Hyperlinks.Add(range, "P:\\"+ PID.Text.ToString() + "\\"+ lst.ToString() + ".avi",Type.Missing, Type.Missing, "" + lst.ToString() + ""); }
range
foreach
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)