I tried doing it like this (at Bart's suggestion), and he says he has it almost exactly like this, and it works for him.
For me, unfortunately, it doesn't, on Mac Safari, IE, and Mozilla.
set csv [list::write_output -name pan]
set outputheaders [ns_conn outputheaders]
ns_set cput $outputheaders "Content-Disposition" "attachment; filename=pan.csv"
ns_return 200 "application/vnd.ms-excel" "$csv"
Any suggestions?