How can I export CDS/ISIS data to another program, such as MS Excel?
SOLUTION
You may export in comma delimited ASCII files using the print dialog box.
PROCEDURE
To do so, you should create/modify what is called a PRINT format in Winisis.
This format is a sequence of instruction telling the software how to output each record. Then you may use the format to visualize as well as print (on printer or on file) your data.
Among the many instructions and rules in the Winisis formatting language, four of them will be useful to us in this context.
1) You should know that each field is identified by a NUMBER and not by a name as in SQL.
2) The instruction to show the content of a field is: Vn where n is the field number. You may see the list of fields in the text file “dbname.FDT� (dbname is your database name).
For example:
v10 –> field 10
v20 –> field 20
etc.
3) In order to go to the line in the output you should use the SLASH /
For example:
v10/v20
will print content of field 10 and then content of field 20 on a new line.
4) In order to print a fixed text, you should use the ‘ (quote). For example:
‘this is a text’/’this is another line’
Therefore in order to obtain a compatible CSV file you should write something as follows:
‘”‘,v10,'”,”‘,v20,'”‘/
Pay attention to the quotes. This will output the following:
“field 10…”,”field 20…” [newline]
Some of the commas (outside the quotes) are used to separate Isis commands.
If you have repeatable subfields, you should use the MODE commands:
mhl,'”‘,v10,'”,”‘,v20,'”‘/
This will transform the output and split field repetitions in a more presentable way.
Once you did obtain the output you want, you should save this format and use it to print to a file through the standard PRINT option (Menu database -> print)
Choose “Output to: ASCII file (Windows)� and select the correct print format from the list. Then click “Print�.
Give a name to the TXT file and click OK. If you wish you may also change the extension by specifying it beside the file name. Example:
Test.csv
Then you may run MS Excel and open the TXT file. Excel will start its import procedure (note that the extension TXT or CSV) is not that important in this case..