How to Convert a List to a Different Format
Tab-Indented files can be easily converted to and from the 'FlatFile' format with the Tab-List Tools program. You can also convert tab-Indented files to the Comma-Separated Values (CSV) format, or to data suitable for entering into a database. Examples are:
Tab-Indented Format:
[7-01 WEDDING]
[PARTICIPANT]
Best Man
Best Person
FlatFile Format:
[7-01 WEDDING]
[7-01 WEDDING]>[PARTICIPANT]
[7-01 WEDDING]>[PARTICIPANT]>Best Man
[7-01 WEDDING]>[PARTICIPANT]>Best Person
CSV Format:
"[7-01 WEDDING]","",""
"[7-01 WEDDING]","[PARTICIPANT]",""
"[7-01 WEDDING]","[PARTICIPANT]","Best Man"
"[7-01 WEDDING]","[PARTICIPANT]","Best Person"
SQL Format:
"Id","Parent","Text"
"1","0","[7-01 WEDDING]"
"2","1","[PARTICIPANT]"
"3","2","Best Man"
"4","2","Best Person"
To try this out, click 'Tools > Testing' to load a suitable tab-indented test-list, or load one of your own. Click 'Tools > Convert Tab-Indented' or 'Tools > Convert FlatFile' to view the Conversion Pages.
The 'Delimiter Character' panel lets you choose which delimiter character you wish to be used when creating a flatfile or CSV list, from a range of the usual choices. You can choose to delete any brackets from your file whilst converting, by checking the 'Delete Brackets' check-box. Once you have done that, you can choose whether to delete all brackets, or a certain type of brackets, with the re-enabled radio-buttons.
The 'CSV Enclosing Characters' allow you to choose which type of characters to use when converting your tab-indented list to CSV format. The final panel 'CSV Options' lets you choose whether or not to add enclosing-characters to empty cells: some programs insist on this, whilst others do not like it.
You can also convert a tab-indented list into a format that is suitable for importing into a database. The table-structure to hold a hierarchy is very simple: for each record you need an ID, the ID of its Parent (if it has one), and the text. Every item in the list has a Parent ID except the Root item, which is given a Parent ID of 0. To generate the data from your list, select a comma as a delimiter character, delete brackets if you wish, and choose suitable Enclosing Characters, then click the 'Tab-Indented to SQL' button.
If you want to convert a Tab-Indented list to the FlatFile format, click 'Tools > Convert FlatFile' to go to the specialist tool page for that action. You will find a FlatFile Hierarchy Checker, which is recommended for checking a FlatFile before performing its conversion to a Tab-Indented List. It will find both Missing Lines and Hierarchy Errors that, if overlooked, will not produce the Tab-Indented List that you were expecting. It is all too easy to overlook such hierarchy errors in a Tab-Indented List of many levels, but the Hierarchy Checker will find them before the conversion is attempted.
Here are some error examples:
Missing Line
[7-02 FUNERAL]>[FUNERAL CATERING]
[7-02 FUNERAL]>[FUNERAL SERVICES]>[PERSONEL]>crematorium operative
[7-02 FUNERAL]>[FUNERAL SERVICES]>[PERSONEL]>grave digger
Books|Children's Books
Books|Children's Books|Action & Adventure
Books|Children's Books|Activities, Crafts & Games
Books|Children's Books|Activities, Crafts & Games|Activity Books|Coloring Books
should be
Books|Children's Books
Books|Children's Books|Action & Adventure
Books|Children's Books|Activities, Crafts & Games
Books|Children's Books|Activities, Crafts & Games|Activity Books
Books|Children's Books|Activities, Crafts & Games|Activity Books|Coloring Books
Hierarchy Error
[7-01 WEDDING]>[PARTICIPANT FAMILY]>Partner of wedding participant
[7-01 WEDDING]>[RELATIONSHIP TO BRIDE]>[ADOPTION]
[7-01 WEDDING]>[RELATIONSHIP TO BRIDE]>[ADOPTION]>Adopted Daughter of the Bride