title: Getting additional rows from power-shell Export-Excel command
body: <p>I have a powershell script below:</p>
  
  <pre><code>$DataVariable = Invoke-Sqlcmd -ServerInstance "B1" -Database "SQL4" -Query "SELECT * FROM Table1"
  
  $DataVariable | Export-Excel  -Path $OutputFile -WorkSheetname "Robert" -Title "MG" -TitleFillPattern DarkDown 
  </code></pre>
  
  <p>If I run this script, am getting additional rows, i.e. <code>RowError</code>, <code>Table</code>, <code>ItemArray</code>, <code>HasErrors</code>.</p>
  
  <p>How can I get rid of these rows?</p>