title: How to show Excel ribbon when it is embedded in Webbrowser
body: <p>Using the suggestion from <a href="http://www.codeproject.com/Articles/15760/How-to-Integrate-Excel-in-a-Windows-Form-Applicati" rel="nofollow">here</a>, I managed to embed Excel 2007 in my WPF WebBrowser control. However, the ribbon doesn't show up. I tried various techniques and nothing makes it work. </p>
  
  <p>I tried this:</p>
  
  <pre><code> _application.ExecuteExcel4Macro("SHOW.TOOLBAR(\"Ribbon\",True)");
  </code></pre>
  
  <p>I also tried to run this from a macro after the Excel workbook is constructed, </p>
  
  <pre><code>Sub hide_ribbon()
      Application.ExecuteExcel4Macro ("Show.Toolbar(""Ribbon"", False)")
  End Sub
  Sub show_ribbon()
      Application.ExecuteExcel4Macro ("Show.Toolbar(""Ribbon"", True)")
  End Sub
  </code></pre>
  
  <p>but it doesn't work either, although the same macro works fine in native Excel.</p>
  
  <p>Also tried this:</p>
  
  <pre><code>    CommandBar cb = _workbook.CommandBars["Standard"];
      cb.Visible = true;
      cb.Enabled = true;
      cb.Position = MsoBarPosition.msoBarTop;
  </code></pre>
  
  <p>Or tried changing "Standard" to "Ribbon", but nothing works.</p>
  
  <p>Ctrl+F1 doesn't work either.</p>
  
  <p>Anybody got a clue?</p>