I want to store the output of:
$Application = Get-EventLog -LogName Application | Where-Object {($_.EntryType -like 'Error' -or $_.EntryType -like 'Warning')};
in an excel spreadsheet.
I tried doing : $Application | Out-File E:\app.csv;
As you can see the columns are not separately aligned in the excel spreadsheet and also the column values/content are incomplete and end with (...).
I want to properly store the complete values that each column holds in the excel spreadsheet.

As already mentioned in the comment, you are looking for
Export-Csvcmdlet whichConverts objects into a series of comma-separated (CSV) strings and saves the strings in a CSV file. You can do something like this -The next step to your problem would be converting the
csvfile intoexcelfile since you need data stored in an excel spreadsheet. Below is the code which I have been using successfully for quite some time.The above code will convert the
csvfile to anXLSXfile. You can see this for more information.