title: How to copy the PowerPivot data into the Excel workbook as a table with VBA?
body: <p>I have found in another post how to copy PowerPivot data into an Excel 2013 workbook, <a href="https://stackoverflow.com/questions/25510224/how-do-you-copy-the-powerpivot-data-into-the-excel-workbook-as-a-table">post</a>. But now I want to do the same thing as the answer but with a macro. (Unfortunately I can't leave a comment so I have to ask it as a new question.)</p>
  
  <p>What I want to do is done by the following steps:</p>
  
  <ol>
  <li>Select the <strong>Data tab</strong></li>
  <li>Select <strong>Existing connections</strong></li>
  <li>Choose the connection one wants.</li>
  <li>Press <strong>Ok</strong></li>
  <li>Press <strong>Table</strong> at the radio button option</li>
  <li>Choose a new sheet (you can choose to put it somewhere in an existing as well but not what i try to do here.)</li>
  <li>Press <strong>Ok</strong></li>
  </ol>
  
  <p>I can't record a macro while I do this, so do anyone know the VBA code to do this?</p>