MacOS – Prevent Safari from transforming downloaded CSV files to Numbers files

csvmacosnumberssafari

On a computer that has Numbers installed, downloading a CSV file will automatically be converted to a Numbers spreadsheet and no longer be a plain CSV (not just the extension, but the contents themselves are transformed such that they are no longer readable in a text editor or similar). If the machine does not have Numbers on it then this conversion does not take place.

The workaround is obnoxious at the time, opening the file in Numbers then saving from there into CSV so it can be actually used as intended.

Is there anyway to disable this automatic transformation from happening (aside from uninstalling Numbers)?


Update: I have tried this on various machines and it is definitely a very spotty behavior. I am teaching Intro CS to a college class and all the students have "identical" machines (except whatever modifications they have made after they received them from the college). About 1/4 of the students experience this problem and none of them know why (not very computer-oriented students being a general-education class).

It seems that on some computers with Numbers installed, opening a CSV file in Numbers will cause Numbers to convert the file to it's own format, delete the original CSV file, and replace it. I can't find a setting for this, but on certain student laptops this is always reproducible.

Additionally, on some computers with Numbers installed, the mime-type text/csv (what the particular server is serving those files as) is considered a 'safe' file and then auto-opened with Numbers, as per How to stop Safari from unzipping files after download

So one solution is following @CraigStodolenak solution which causes Safari to them auto-open the file with a different program and the auto-conversion then never happening.

Once I get access to another machine like this I will also try the ⌥ alt trick that disables auto-opening for a single link in Safari.

As a side note, on my own machine from the school and another loaner I have received I cannot reproduce the issues with auto-opening or auto-transforming.

Best Answer

Safari does not post process files or transform them. It saves them exactly as the web server sends them or it throws an error code.

The worst thing Safari could do is decide the file is “Safe” and open it in the default application. You should disable opens safe files on Safari and then re-download the files in question.

Finder controls which apps open which file, so if you decide to re-enable “open safe files” be sure to chose TextEdit or another file to open .csv files or delete Numbers so that there’s no default Application for these files.

In more detail on the Finder opening - macOS keeps track of which apps open specific file types. When Numbers is installed, Apple matches all .CSV files to Numbers. To change this, Get Info (⌘-I) on a .CSV file in the Finder and perform the following:

  1. under Open With dropdown, select a different app to open this type of file (TextEdit, BBEdit, SublimeText, Atom, etc.)
  2. click on Change All... button
  3. click on Continue