Hi, I have a text file with school addresses and phone numbers sampled below. As you can see that the # of rows per record is not fixed. Otherwise I could use transpose node. Is there a way I can convert the rows to columns, having one row per record? Thank you!
7639 W Dawl St
Tallahassee, FL 32304-3556
1234 Street Dr NE
Atlanta, GA 30322-0001
1234, ave de la Medecine
Quebec City, QC G1K 7P4
Welcome to the forum @rumanac.
Here’s an example that should get you started. I’m assuming that the empty lines that you show in your example data are present in your actual data.
I used the line reader node to read the text file, making sure to go to the Advanced Settings tab and replace empty lines with a character that won’t appear in any of the text. In this case I used ‘|’.
The Transpose nodes turns this single column into a single row with multiple columns.
The Column Combiner node combines all these columns into a single cell, with the comma as the delimiter.
I then split this single cell into multiple columns using ‘,|,’ as the delimiter (from step 1)
A final transpose gets you a row for every entry.
Thank you so much @elsamuel for the solution!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.