title: Python (3.6) (win32) to start Excel with the add-in SAP Analysis for Excel
body: <p>I'm trying to replace my VBA code(s) with python (3.6) and I cannot figure out how to start Excel (2016-64) with SAP Analysis for Excel from Python. Below is the code I'm using.</p>
  <pre><code>import win32com.client as w32
  
  f_path = &quot;example.xlsm&quot;
  
  xl = w32.gencache.EnsureDispatch(&quot;Excel.Application&quot;)
  wb = xl.Workbooks.Open(os.path.abspath(f_path))
  xl.Visible = 1 
  xl.WindowState = w32.constants.xlMaximized
  </code></pre>
  <p>With this method Excel will open however the Analysis add-in (.vsto) does not load. The things I've tried so far:</p>
  <ul>
  <li>Set the LoadBehaviour to 3 in regedit for the add-in (so it starts automatically)</li>
  <li>Try to launch the add-in with python in shell</li>
  <li>Include a macro within the Excel file that starts the add-in</li>
  </ul>
  <p>If I start the file manually then the add-in loads properly. If I use the last two method then a new Excel instance will be started with the add-in while the file I was trying to use will not have the add-in loaded.
  What I found interesting that if I start Excel (without the add-in) and - by using VBA - I start the add-in (with the shell lib) then it loads properly.</p>
  <p>Did anyone else had this issue before?</p>