title: PowerShell export to CSV offset rows
body: <p>I updated some code from a something I found that exports multiple sheets from an Excel file to CSV files. I need to export without the first 6 rows. They all have the same format.</p>
  
  <p>Where can I apply an offset for each tab?</p>
  
  <pre><code>function ExportWSToCSV {
      Param(
          [Parameter(Position=0, Mandatory=$true)] [string]$excelPath,
          [Parameter(Position=1, Mandatory=$true)] [string]$excelFileName,
          [Parameter(Position=2, Mandatory=$true)] [string]$excelFormat,
          [Parameter(Position=3, Mandatory=$true)] [string]$csvPath
      )
  
      Write-Output "Your cvs files are located " $csvPath
  
      $excelFile= $excelPath + $excelFileName + $excelFormat
      $E = New-Object -ComObject Excel.Application
      $E.Visible = $false
      $E.DisplayAlerts = $false
      $wb = $E.Workbooks.Open($excelFile)
      foreach ($ws in $wb.Worksheets) {
          $n = $excelFileName + "_" + $ws.Name
          $ws.SaveAs($csvPath + $n + ".csv", 6)
      }
      $E.Quit()
  }
  </code></pre>