Purpose Read a .csv file and display its content via a table control |
Solution
Example
We display it in the following form:
Remark: The following tip "Selecting rows of a table variable" will show a more sophisticated version of this example
GuiXT Script CreateTable V[cities] city latitude longitude country countrycode population // load content from .csv file CopyText fromFile="C:\temp\cities.csv" toText="cities" CopyText fromText="cities" toTable=V[cities] delimiter=";" // sort Sort V[cities] orderBy="countrycode,city" endif // display city table title="&V[cities.rowcount] cities" Column "CC" size=3 name="countrycode"Column "City" size=30 name="city" Column "Country" size=30 name="country" Column "Population" size=12 name="population" Column "Latitude" size=10 name="latitude" Column "Longitude" size=10 name="longitude" |
Components |