If I have a simple text file showing user's first name, middle name (if available), last name, and email address, is there a quick way to convert this to a csv format using Powershell or maybe even Excel? The CSV file would only need to show the first name, last name (which could be a combination of middle name and last name), and email address.
For example, if I have a text file as follows:
James Tiberius Kirk james.kirk@starfleet.comLeonard McCoy leonard.mccoy@starfleet.com
I would like to convert to csv as follows:
FirstName,LastName,EmailAddressJames,TiberiusKirk,james.kirk@starfleet.comLeonard,McCoy,leonard.mccoy@starfleet.com
Am not sure how to do, other than manually, which is time consuming for large text files.