Azure / Microsoft365R

R SDK for interacting with Microsoft 365 APIs
Other
308 stars 42 forks source link

mimeType for csv files #120

Closed elinw closed 2 years ago

elinw commented 2 years ago

Everything worked great for downloading xlsx files, but I ran into an issue with csv files. The mimeType of these files should be "text/csv" but apparently it is a known thing that if a file is ever edited in Excel it will have the mime/Type changed to "application/vnd.ms-excel" . This then seems to create a problem, either opening in the browser or downloading and then opening gives me a file with one long line of characters.

If I go to OneDrive in my browser and either open in browser or download via the gui everything is fine.

Actually I have no idea if the mimeType is causing this or something else, but I did read a number of Stack Overflow posts about problems reading downloaded csv files and that was the issue identified.

Update: There is definitely something not right, but with a different csv file, produced by the same process and uploaded to one drive with the same flow did not have this problem.

hongooi73 commented 2 years ago

There is probably an issue with your editor/browser detecting newlines in the csv file.