Reputation: 2077
When I add Microsoft.Office.Interop.Excel reference to my project I cannot find the DropDown Interface which is described here:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.dropdown(v=office.14).aspx
Anyone knows how to access it?
I would like to add a dropdown list to a cell as described here:
http://july-code.blogspot.com/2008/03/add-drop-down-list-into-excel-file.html
I'm using Microsoft.Office.Interop.Excel version 14.0 with the runtime version 2.0.50727.
Upvotes: 1
Views: 276
Reputation: 7993
It is not part of the Application
interface but instead is it's own interface.
Not sure what your code looks like but however you declare the excel com object; Use that name.
So the way you declare something along the lines of x = new Excel.Application()
where Excel is your com object name, whatever that name is you use ComName.DropDowns
it will not be in intellisence, but it is there after you declare it.
So if your using is like this:
using Excel = Microsoft.Office.Interop.Excel;
Then you probably have something LIKE:
Excel.Application oXL;
to get the Application Interface so when you want the drop down call it as:
Excel.DropDowns oDropDowns;
So if your using is:
using xlComObject = Microsoft.Office.Interop.Excel;
then the drop downs would be:
xlComObject.DropDowns MyExcelDropDowns;
Upvotes: 1