Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Parse .csv file from text to columns, but dont know how many columns.

GitaSivanandan
5 - Atom

I have a .csv file and want to parse the data into columns, however, i do not know how many columns it will result into. What should I do? In Excel, with " text to column" option it automatically converts into the required number of columns. 

2 REPLIES 2
Luke_C
17 - Castor

Hi @GitaSivanandan 

 

When you input the CSV into alteryx you should be able to specify the delimiter. There's not really a need to use the text to columns tool unless you have some messier data. Can you attach some sample data in csv? The file you attached is xlsx. 

Emmanuel_G
13 - Pulsar

Hi @GitaSivanandan ,

 

Please find attached a way to calculate the number of fields you have for each row.

 

The principle is simple: We calculate the number of characters in total on a line minus the same number but without considering the column delimiters.This gives the number of delimiters.

 

Just add 1 to get the total number of columns.

Emmanuel_G_0-1659438430579.png

 

 

Labels