how to export a crosstab?

tudorconstantin

New Member
This code produces exactly your output.

define variable i as integer no-undo.
define variable j as integer no-undo.

output to "c:\crosstab.txt".
do i = 1 to 4:
do j = 1 to 4:
if i eq 1 then put unformatted j " ".
else
if j eq 1 then put unformatted i " ".
else
put unformatted i j " ".
end.
put unformatted skip.
end.
output close.

Let me know if there is more or else that you need.
 
Hi,

You can do one thing. Create a extent based on number of columns i.e for example if you have 4 columns then have variable "x" of character with extent 4. then spool the data for respective index (array index). When the variable "x" is displayed it will display the values horizontally.
 
Top