Export extra variable log in a CSV or text file

How can I export extra variables to a CSV or text file for the seismic site response results?
I tried using the commands below, but they did not work. I would like the output to be written horizontally, with each column representing one variable and each row representing one element in the 1D column. This is for FLAC 8.1.

set logf maxprofile.his
set log on
print ex_35
print ex_47
print ex_49
print ex_56
set log off

You can write a simple fish function, loop each zone and store the values from the extras to tables and then use table write x xx … filename command to write table data to a file.