Forum Discussion
tcboeira
Feb 22, 2023Brass Contributor
How to split rows into column by specific delimiter
Hello. Good afternoon! Well, being direct: The question of the output of the ";" to "," I solved it... I have a routine that generates a CSV file, and it looks like this: A B C D E F G ...
tcboeira
Feb 28, 2023Brass Contributor
Hello,
First of all, thanks for the reply and sorry for the delay in getting back to you...
I think I failed to exemplify correctly...
I extract some data, via CSV file, which returns me like this:
| COL1 | COL2 | COL3 | COL4 |
| 11 | 12 | 13 | 14 |
| 22 | 22 | 23 24 25 26 | 27 |
| 33 | 32 | 33 | 34 |
And I wish it could look like this:
| COL1 | COL2 | COL3 | COL4 |
| 11 | 12 | 13 | 14 |
| 22 | 22 | 23 | 27 |
| 22 | 22 | 24 | 27 |
| 22 | 22 | 25 | 27 |
| 22 | 22 | 26 | 27 |
| 33 | 32 | 33 | 34 |
I even tried something using the example...
Is that right? Is it for this purpose?
AndySvints
Mar 01, 2023Iron Contributor
Hello tcboeira,
Yes, the code provided is exactly for the use case that you are describing.
Here is the execution of it on your data set:
One caveat is that the order of the columns will be messed up. Column in question will be all the way in the end.
Hope that helps.