Seems like you do not die
after you generate the CSV which meas that wordpress will continue to generate whatever is the relevant admin HTML after it had generated the CSV.
Seems like you do not die
after you generate the CSV which meas that wordpress will continue to generate whatever is the relevant admin HTML after it had generated the CSV.