Creating a drop down/combo box

Nov 10, 2010 at 11:33 AM


I am using C# and ASP.NET and I need to export data to an Excel spreadsheet.

I have a list of applications that contains Application objects.  Each Application object has a status ID.  When I export these applications to Excel then I need a column with a drop down/combo box in it.  In this drop down/combo box should be a list of all the statuses.  And then I need the status to be selected to that of the application's status ID.

Another question is also with regards to the above scenario.  When the user downloads the Excel document then the user can change the status of each application by selecting a different value in the drop down.  I will need to upload this spreadsheet and loop through the rows and get the values of the columns and the value of the selected item in the drop down/combo box.  How would you do this?

Is this possible?  If so, can someone please help provide some sample code for me?



Nov 10, 2010 at 3:45 PM


There is no support to create comboboxes or handle data validation in the library at this point.

I guess you can always use a predefined template and update it, but you can't read the value of a combobox-object to get the value. You could try to use datavalidation in the template. I'm not sure if it will work (since it is not supported by the library yet), but give it a try.


Nov 11, 2010 at 5:30 AM

Ok, but can you atleast tell me how to create a dropdown item populated with values from another sheet?  And then if my application object has a status of declined then I want Declined to be selected from the dropdown.

Nov 11, 2010 at 7:30 PM

As i said, the library don't support combo boxes or datavalidation, so you can't do that. You can add the data validation from Excel and open a the document,but you can't alter the datavalidation in any way.


Nov 30, 2010 at 1:45 PM

I could really use this as well..

Is this feature on the roadmap to be implemented ?

Dec 1, 2010 at 7:45 AM

Datavalidation will be added in the next version (I have no date for it yet). If you want the Form control combobox, I have no plans to add to it at this point.