What is the easiest way to export from an array to a CSV file? I was planning on using a for loop and inserting commas into the string, but realized I don’t know how to change the txt file into a CSV file. Thanks for the help!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I always use
I only ever use it to create a .csv file from an array of floats or strings. If you have formatting characters in your data you might have to call an escape-addition method before you generate the .csv to get everything to look like you want.
If you want multiple lines in a .csv then you need to add
\nat each line break (if you don’t already have it).