Use VSTO extensions with AddinExpress.MSO.ADXAddinModule.HostApplication

Add-in Express™ Support Service
That's what is more important than anything else

Use VSTO extensions with AddinExpress.MSO.ADXAddinModule.HostApplication
 
Miguel Sousa




Posts: 7
Joined: 2010-11-22
I need to create ListObjects in AddinExpress.MSO.ADXAddinModule.HostApplication (which is an Interop.Excel.Application) ActiveSheet, those ListObjects datasource will be a dataset.
I need to use VSTO Worksheet,because it has the property Controls, and we can create ListObjects with datasets as data source (worksheet.Controls.AddListObject(dataSet, listName);).
How can i obtain a VSTO Worksheet from a Interop.Excel.Worksheet, knowing that when i use GetVstoObject with the AddinExpress.MSO.ADXAddinModule.HostApplication it returns null, and HasVstoObject returns false?


Thank you
Posted 26 Nov, 2010 04:55:09 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Miguel,

Please note that you develop an Office COM add-in (not a document level add-in). According to the Getting Extended Objects from Native Office Objects in Document-Level Customizations article in the VSTO MSDN documentation it shouldn't return null in a document-level customization only.
.NET, Extended MAPI, Windows Phone & RT
Posted 26 Nov, 2010 05:40:56 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Miguel,

Also I have found the Dynamically Creating a VSTO Worksheet in Visual Studio 2008 SP1 blog post for you.
.NET, Extended MAPI, Windows Phone & RT
Posted 26 Nov, 2010 05:45:48 Top