I have an array that begins like this:
Each item in the array is a string that consists of four parts (a date, a product, a user and a server) that are separated by commas.
In my naivety I thought that I could simply export this to a csv file and the commas would be recognized as delimiters by Excel and chopped into four columns.
Well, that didn’t work. It created a single column with quote marks enclosing the whole thing.
I experimented with the split function, tried to create a new object with four properties in it, tried using an array of arrays, tried using hash tables, all to no avail. I’ve got myself confused now. I’m new to PowerShell and it’s messing with me…
Does anybody have any idea how I might go about converting the above into a csv file that looks correct in Excel?