I am trying to code a script for downloading data to a CSV file.
I followed your example and included the line
ContentType = "application/unknown"
but the CSV content is being returned to the browser instead of to a file.
The identical code works fine for Excel files but CSV data is being returned to the browser.
What do I need to do differently for CSV?