How to split single row CSV?

0

I have a CSV file that imports like this:

Field1_Entry1,Field2_Entry1,...FieldN_Entry1,Field1_Entry2,Field2_Entry2...

I intend to have a new row after Field N so I get a table with N columns:

Field1_Entry1 | Field2_Entry1 | ...FieldN_Entry1

Field1_Entry2 | Field2_Entry2 | ...FieldN_Entry2

etc

Fwiw I have been able to insert a blank column after each FieldN using a delimiter but I haven't figured out how to jump to a new row.

Any ideas?

Thanks.

Argonyth

Posted 2018-01-06T08:47:53.277

Reputation: 1

1I am assuming that the "..." is not inside the file? but it is seperated with a comma? – veritaS – 2018-01-06T08:58:01.953

yes indeed, my bad, all values are separated in commas, I just new a new row after every N columns – Argonyth – 2018-01-06T09:05:14.720

Answers

0

If I understand correctly, you still want each cell to contain Fieldx_Entryx, right? If so, it's just simple matter of converting all of the commas to tabs. Open the file in a text editor and do a global search and replace. Then select all, copy, and paste into Excel. This assumes you don't have any commas in your actual field names or data.

I just noticed your edit... you'll also need to replace ",Field1" with "{CRLF}Field1"

Charles Burge

Posted 2018-01-06T08:47:53.277

Reputation: 1 792

right, this is my current workaround. I was wondering if there is one within excel.. – Argonyth – 2018-01-06T10:01:15.413

Well you could probably write a VB Script that could parse the file, but I think that's only worthwhile if you have multiple files that need the same treatment. – Charles Burge – 2018-01-07T04:57:17.103

You can do this in Excel using Text to Columns.

– Bandersnatch – 2018-01-07T05:34:50.740