cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Analysis for Excel

PavelKrál
Level 5
Hi, If i open excel manually, Analyissi tool is active, If i create instance or open Workbook from BP, analysisi is not active... in the com addins its telling me its load at startup and active, but its not. Any help with this? Same issue is with PowerPivot. How can i change the code so the addins are loaded as well during Instance creation?
1 REPLY 1

PavelKrál
Level 5
Ok, so i have a code than can activate or deactivate ComAddin. I have set to see the Excel Instance with Show object, and after checking the COM list, its working. i can disable or enable COM but AddIn is not active among the ribbon panel. Is something missing? in VBA this kind of approach works. I have added office.dll so i can use Microsoft.Office.Core namespace.   code below: Dim wb as Object = GetWorkbook(handle,workbookname) Dim app as Object = wb.Application Dim addin As COMAddIn Try     For Each addin In app.COMAddIns         If addin.Description = AddInDescr Then    If ActivateCom = True     If addin.Connect = False Then addin.Connect = True    Else     If addin.Connect = True Then addin.Connect = False    End If   End If     Next Success = True Catch e As Exception  Success = False  Message = e.Message Finally  wb = Nothing  app = Nothing End Try