My requirement is to export a blank excel sheet with 3 columns in which 1st columns of all rows as a dropdownlist, so that user can use this work sheet to modify the data as per their need. I am using c# to exporting file.
I already worked on it but that at the moment, it only creates a dropdown list in a particular cell but I want to make all the rows of first column as a dropdown list .
Below is the code I am using:
object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Excel.Application app;
Microsoft.Office.Interop.Excel.Worksheet wksheet;
Microsoft.Office.Interop.Excel.Workbook wkbook;
app = new Microsoft.Office.Interop.Excel.Application();
app.Visible = false;
wkbook = app.Workbooks.Add(true);
wksheet = (Microsoft.Office.Interop.Excel.Worksheet)wkbook.ActiveSheet;
string[] ddl_item = 
{
    "Answers",
    "Autos",
    "Finance",
    "Games",
    "Groups",
    "HotJobs",
    "Maps",
    "Mobile Web",
    "Movies",
    "Music",
    "Personals",
    "Real Estate",
    "Shopping",
    "Sports",
    "Tech",
    "Travel",
    "TV",
    "Yellow Pages"
};
Microsoft.Office.Interop.Excel.Range xlsRange;
xlsRange = wksheet.get_Range("A1", "A1");
Microsoft.Office.Interop.Excel.DropDowns xlDropDowns;
Microsoft.Office.Interop.Excel.DropDown xlDropDown;
xlDropDowns = ((Microsoft.Office.Interop.Excel.DropDowns)(wksheet.DropDowns(oMissing)));
xlDropDown = xlDropDowns.Add((double)xlsRange.Left, (double)xlsRange.Top, (double)xlsRange.Width, (double)xlsRange.Height, true);
//Add item into drop down list
for (int i = 0; i < ddl_item.Count(); i++)
{
    xlDropDown.AddItem(ddl_item[i], i + 1);
}
app.Visible = true;