To redirect command output to a text file, use the ">" operator. The general form is
[command] >[outputfile.txt];
A particular example would be
display x >decision.txt;
There is also a way to send values directly to an Excel file, but that is more complicated; it is described in detail in chapter 10 of the AMPL book,
http://ampl.com/BOOK/CHAPTERS/13-tables.pdf, which covers reading and writing to database and spreadsheet files.
Bob Fourer
am...@googlegroups.com
=======