This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I would explore using the Text To Columns tool still, but try splitting to rows instead. Then use the Cross Tab tool to change your rows into different columns. Note you may need to insert a Formula tool before the Cross Tab in order to create a header field.
I have a solution for your question, in order to dynamically run Text to Column tool, you would have to create a Batch Macro and with the help of some formula, you would be able to dynamic your output.
Create a new column using a formula tool and use formula - REGEX_CountMatches([Fruits], ",") + 1. It would give the count of delimiters available in a string. See Screenshot.
Create a batch macro, under Updated Value, select @value-value = "3" and check mark "Replace a specific string". I have attached workflow both macro and workflow for your reference.
You would have to use summarize tool to find out the max value for fields to split, i.e. max number of columns
now attach the macro and see the results. A screen shot of the result is also attached here.
Let me know if you have any concerns. Happy Learning.