Contents - Index


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' to view the Conversion Page.

 

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.