0

I have used the closedxml.dll for generating worksheet.

I have an application where on click of button saves some data in Excel using C#.I have used the memorystream for saving inside the excel sheet. I have also kept dropdown for some columns inside sheet. When i download the excel and check the Data and the dropdowns are working fine.

Now I have a requirement like Calendar control should come for one column when I click on the cell like just in below pic situation.

Excel

Here when the cell on the column DOB is clicked Calendar or DateTimepicker should show to select the date.

Your help is high appreciable

Thanks

charan tej
  • 1,054
  • 10
  • 29

1 Answers1

0

You have to Place the ActiveX Control on the Worksheet.

  • In the Controls section of the Developer tab click the Insert button to display a selection of controls.
  • Click the More Controls button to open the More Controls dialog.
  • Scroll down the list and find Microsoft Date and Time Picker Control.
  • Click on the worksheet approximately where you want the control to appear
  • use the mouse to resize and position it.
  • Click the Design Mode button on the Developer tab to take the worksheet out of design mode in order to activate it.

enter image description here

Hope it helps you.

Ranadip Dutta
  • 8,857
  • 3
  • 29
  • 45
  • Hi @Dutta here my situation not manually creating the datetime in Excel Sheet. I have code in C# in the application. So From that code only i am plotting the Dropdown and values for that dropdown. Likewise I need to get the DateTimePicker also – charan tej Dec 08 '16 at 09:19
  • Oo I see. Could you please share the C# code. Although I dont think we can add an Active X from the code and further we have to drill down to so many options and enabling the developer tab also is pretty hectic. – Ranadip Dutta Dec 08 '16 at 09:25
  • For DateTime I didnt write and C# – charan tej Dec 08 '16 at 09:33
  • Alright. I will try to work on it. If there is any solution for it. I will post it. – Ranadip Dutta Dec 08 '16 at 09:53