I thought this would be a simple task. All we want to do is export a large dataset to excel or as a CSV file. Several posters have given suggestions but none seem to work properly. Basically, the data has comment fields and within them interviewers have put commas so exporting as a CSV file, the variables do not separate correctly. What is interesting is that most of the data seems to export correctly, even when there appears to be a comma in a field. For some reason for several variables the file does not separate correctly so data is not showing up in the right columns, it is moved over to the wrong columns and creating blank rows of data. Is there a way to figure out why it is being separated incorrectly? One of my first thoughts was to just remove all commas, replace them in excel and export the data but when I run the code that was suggested to remove commas it does not seem to work properly and this error still occurs. I thought it would be a simple task to export to excel but it is turning out to be much more challenging. Any suggestions as to how to fix these errors would be greatly appreciated.
... View more