CSV-wizard

Top  Previous  Next

User interface > Main menu > Menu: Help > Wizards > New project wizard > CSV-wizard

 

With the abbreviation CSV ( Character Separated Values ) files are named whose lines consist of data, which are separated by commas or other separators from each other. Many database applications can read and write such files.

 

The wizard described here, allows extracting the individual data. You then can change them or arrange them differently. It is assumed that the separator doesn't occur within the data. If this shouldn't be the case at your CSV file, then you can use the wizard, which generates a line parser from an example text.

 

WizardCSV_en

 

It's possible not only to define a comma as a line separator, but any arbitrary other character too. It is also possibly to define a set of separators, but two fields always will be separated by only one of them. If more than a character separates the columns, you can define the separator also as a literal expression.

 

After the number of columns was set, you can go to the next page of the wizard, where you can choose the kind of actions you want to be generated. On the next page then you can see the text of a production, which is generated from the settings.

 

For writing a simple comma separated text of two columns in string variables the production is:

 

{{

str sCol1, sCol2;

}}

 

(

SKIP     {{sCol1 = xState.str(); }}

","

SKIP     {{sCol2 = xState.str(); }}

EOL

)

 

{{

// out << Here you can output the columns in the desired form.

}}

 

E.g. the comment in the second to the last line could be replaced now by:

 

out << sCol2 << "," << sCol1 << endl;

 

An output text would be created, in which the columns of the source text would be exchanged.

 

A video, which demonstrates this wizard, is at:

 

http://www.texttransformer.com/Videos_en.html

 



This page belongs to the TextTransformer Documentation

Home  Content  German