Skip to main content
Question

Outputting a csv as txt

  • March 18, 2025
  • 1 reply
  • 25 views

jferrer
Contributor
Forum|alt.badge.img+5

I wanted to make a simple app that reads from database and writes as either a csv or txt file. I created parameter to either choose csv or txt. I put that user parameter on the csv writer under dataset extension.

When I try the app, I’m able to successfully download the csv but when I choose txt - it does not download but shows the full table right on the internet browser. I was wondering how to fix this. Also I am unsure as to how to use the txt writer and put my data as csv there instead. Maybe that would be a good workaround.
 

1 reply

hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • March 18, 2025

I believe that is set at the browser level (default file handling or similar).

You can force the text file writer to use a specific MIME type to hopefully force the browser to download it. Try updating the writer to have a MIME type of  application/octet-stream


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings