To implement an ActiveX ATL control that can be inserted into an MS Excel worksheet, follow these steps:
Make sure that C: \ Users \ $ (UserName) \ AppData \ Local \ Temp \ Excel8.0 does not have cached ActiveX * .exd control data, which may be an unobvious obstacle
Create an ATL DLL Project with All Defaults
2.1. Add the x64 configuration as a copy of the existing Win32 - for 64-bit Excel you will need a 64-bit ActiveX control
- Add ATL Control class using wizard

3.1. Be sure to fill in the ProgID field

3.2. Add the IPersistStreamInit page on the Interfaces page

Create a DLL and register (regsvr32)
In Excel, a new control appears in the Developer, ..., More Controls menu


- Insert it and have fun from there

Source Code: Subversion / Trac
UPDATE : question from comments below:
... does Excel support windowless activation?
To see the control operation in action, add the code there :
CSample() { CTrace::SetLevel(4);
and
HRESULT OnDraw(ATL_DRAWINFO& di) { const CComQIPtr<IOleInPlaceSiteWindowless> pOleInPlaceSiteWindowless = m_spClientSite; ATLTRACE(_T("m_spClientSite 0x%p, pOleInPlaceSiteWindowless 0x%p, m_hWnd 0x%08X\n"), m_spClientSite, pOleInPlaceSiteWindowless, m_hWnd);
This allows you to print controls that help identify the window / window mode. Output (in the end, after activating the object or from the very beginning):
... Sample.h(118) : atlTraceGeneral - m_spClientSite 0x0000027A9CA7B460, pOleInPlaceSiteWindowless 0x0000000000000000, m_hWnd 0x0105069C ... Sample.h(118) : atlTraceGeneral - m_spClientSite 0x0000027A9CA7B460, pOleInPlaceSiteWindowless 0x0000000000000000, m_hWnd 0x0105069C
The control can activate both window and window windows (unless m_bWindowOnly is set to true, in this case the window mode is forced). Tracing shows that the control, however, is performed in windowed mode, and this container does not have IOleInPlaceSiteWindowless , which is mandatory for a IOleInPlaceSiteWindowless window.