This has been posted in the newsgroups a few times, but really is required when adding dynamic controls. If you are trying to get references to the managed (Excel.Tools) object, this is the way to go. This creates a new managed worksheet object that has a controls collection that you can then use. Here is the basic code for the function:
internal Microsoft.Office.Tools.Excel.Worksheet GetExtendedWorksheet(
ref Microsoft.Office.Interop.Excel.Worksheet nativeWorksheet) {
// Get the IHostItemProvider instance.
Microsoft.VisualStudio.Tools.Applications.Runtime.IHostItemProvider hostItemProvider =
(Microsoft.VisualStudio.Tools.Applications.Runtime.IHostItemProvider)(RuntimeCallback.GetService(typeof(Microsoft.VisualStudio.Tools.Applications.Runtime.IHostItemProvider)));
// Create the new worksheet and return it to calling function.
return new Microsoft.Office.Tools.Excel.Worksheet(hostItemProvider,
RuntimeCallback,
nativeWorksheet.CodeName,
Container,
nativeWorksheet.Name);
}