Forum Discussion

javierin's avatar
javierin
Copper Contributor
Mar 31, 2025

Excel 365 (EU) CSV Export on MacOS

Hi

I'm running Excel 16.95.1 (build 25031528) on MacOS 15.3.2

I am trying to export a CSV file that uses commas as field separators. It keeps using semicolon as a separator. I often find posts asking about this here and there, and most people come back with regional settings of the OS being incorrect. My Regional settings are OK, they are configured to Spain region which is my location.

For some reason, Excel for MacOS doesn't have the "Select separator" option from the Save As... CSV menu and it seems not to be configurable in the app preferences, which are really limited.

Is it that difficult that we can save to CSV (COMMA separated values) using COMMAs as separators instead of SEMICOLONS, or at least be able to choose if I want a different separator?

I would greatly appreciate any suggestion leading to a simple solution that does not require coding, macros or any kind of wizardry to perform such a simple task.

Thanks in advance

3 Replies

  • javierin's avatar
    javierin
    Copper Contributor

    This worked, but still demonstrates a lack of a basic feature within excel, which is present in Windows version of the app.

    Open a terminal within MacOS and type:

    defaults write com.microsoft.Excel CSVDecimalSeparator -string ”.”
    defaults write com.microsoft.Excel CSVListSeparator -string ”,”

    Please note the original answer used the same comma for separator and decimal and would make any export with decimals broken. 

  • 1. Quickly export EU format CSV
    Steps for correct saving
    In Excel:
    Click “File” → “Export” → “Change File Type”.
    Select “CSV (comma separated) (.csv)”.
    Click “Save” → Select in the pop-up dialog box:
    Character encoding: Unicode (UTF-8)
    Field Separator: Comma
    Text qualifier: ”
    2. Terminal validation format
    bash
    # Check file encoding and delimiter
    file -I exported_file.csv
    head -n1 exported_file.csv | od -c
    3. Solve common garbled code problems
     Force UTF-8 with BOM
    powershell
    # Convert via PowerShell (Mac requires PowerShell Core)
    Get-Content -Path “input.csv” | Out-File -FilePath “output.csv” -Encoding utf8BOM
    4. Replace the separator
    bash
    # Convert semicolons to commas (for European formats)
    iconv -f ISO-8859-1 -t UTF-8 input.csv | tr ';' ',' > output.csv
    5. Automated Scripting Programs
    AppleScript automated export
    applescript
    tell application “Microsoft Excel”
      set csvFormat to CSV file format
      set csvFormat's TextFileCommaDelimiter to true
      save workbook as filename “output.csv” file format csvFormat
    end tell
    6. Python Precision Control
    Python
    import pandas as pd
    df = pd.read_excel(“input.xlsx”)
    df.to_csv(“output.csv”, sep=“,”, encoding=“utf-8-sig”, quotechar='"', index=False)
    7. System level region settings
     Temporarily switch the region format
    bash
    # Temporarily set to EU region before exporting
    defaults write -g AppleLocale en_GB
    8. Modify Excel defaults
    bash
    # Force Excel to use comma separators
    defaults write com.microsoft.Excel CSVDecimalSeparator -string ”,”
    defaults write com.microsoft.Excel CSVListSeparator -string ”,”

    • javierin's avatar
      javierin
      Copper Contributor

      Hi Mikayla

       

      Thanks for your response (or your AI's). I would appreciate tips on how to reach that Export menu:

      Also, I would prefer not to have to use Pandas nor Python to export to "Comma Separated Values" which are actually separated by commas, as mentioned in the initial post.

       

      All this AI generated unverified responses just fill the forum with clutter and make misleading, random suggestions.

Resources