title: Import Data from Powershell object into Excel Spreadhseet
body: <p>I have built a powershell object in a script.  In this same script I need to take that object (or parts of it) and load them into an Excel spreadsheet.  The excel spreadsheet is already saved and has headers.  I am able to find my .xlsx file, open it, save and close but not sure how to actually get my object into the file.  This script will be run a lot so ultimately I need the data to just append to the first available/empty row. </p>
  
  <p>Here is the script that is opening the excel file: </p>
  
  <pre><code>$excel_file_path = 'C:\Users\ME\Documents\Test\SFTPTest.xlsx'
  # Instantiate the COM Object
  $Excel = New-Object -ComObject Excel.Application
  $Excel.Application.Visible = $true
  $Excel.DisplayAlerts = $false
  $ExcelWorkBook = $Excel.Workbooks.Open($excel_file_path)
  $ExcelWorkSheet = $Excel.Worksheets.item("SFTPTransfers")
  $ExcelWorksheet.activate() | Out-Null
  </code></pre>
  
  <p>The headers in my excel spreadsheet are on row 1 and there are 9 columns (A-I)</p>
  
  <p>My PS Object is a large oject converted from a JSON object.  I only need 9 properties of this object to go into this spreadsheet. For example, I have a property called Object1.ServerName that needs to go into the my excel file under ServerName column...etc.</p>