try{ # Excelオブジェクト作成 $excel = New-Object -ComObject Excel.Application $excel.Visible = $false # 既存のExcel $book = $excel.Workbooks.Open("Excelが置いてあるpath") # シート取り出し $sheet = $excel.Worksheets.Item(1) $sheet = $excel.Worksheets.Item("シート名") # セルのテキストを取得(設定は逆) $text1 = $sheet.Cells.Item(2,3).Text # セルの値(数字)を取得(設定は逆) $text1 = $sheet.Cells.Item(2,3).Value() # その他やりたい処理 # 上書き保存 $book.Save() # 閉じる $excel