title: Multiplication table Powershell
body: <p>I am trying to make a multiplication table 10x10 by using nested for loops that will open in excel. So far, I have this to open excel:</p>
  
  <pre><code>$excel = New-Object -COMObject Excel.Application
  $excel.Visible = $true
  $excel.Workbooks.Add()
  </code></pre>
  
  <p>And this to display the table:</p>
  
  <pre><code>for ($i = 1; $i -le 10; $i++) {
      for ($j = 1; $j -lt 10; $j++) {
          $total = $i * $j;
          Write-output $total 
      }
  }
  </code></pre>
  
  <p>But the table does not display in 10x10 format table but one under the other. Can someone help me put this together or give me some hints how to make it work? </p>