Hi - I am looking to convert the following text to csv. The columns may not always have data in them and they may have varying spaces but I still need to have a comma there anyway:
Sample Data:
```text
Name Email Location Phone
Tom Smith toms@me.com home +65 5555 5555
John,,,
Jerry T. Wright jerry@me.com NY office +1 212 555 5555
Phil Dell phil@me.com +1 212 555 1111
```
Need it to look like:
Name,Email,Location,Phone
Tom Smith,toms@me.com,home,+65 5555 5555
John,,,
Jerry T. Wright,jerry@me.com,NY office,+1 212 555 5555
Phil Dell,phil@me.com,,+1 212 555 1111
cgkmal - Thanks for your reply! It's not writing the additional commas where there is no data. Any idea?
Output is below:
Name,Email,Location,Phone
Tom Smith,toms@me.com,home,+65 5555 5555
John
Jerry T. Wright,jerry@me.com,NY office,+1 212 555 5555
Phil Dell,phil@me.com,+1 212 555 1111
For instance - after John, there should be 3 commas and for Phil's location there should be 2 commas between email and phone.