Member Avatar for Member #380484

Hi all,

I've responded to a lot of threads but this is the first of my very own.

I'm using Excel to manage a small amount of data for a website and saving the spreadsheet as CSV from Windows MS Office 2003 Excel.

My client uses Mac Office X Excel and her version will not open the CSV files that my Windows version creates.

I've tried to "save as" both the normal and the Macintosh versions of .csv but neither seem to work.

Anyone familiar with this situation?

Attached excel_csv.zip contains two Excel .csv files created by Windows Office Excel 2003, normal.csv is just saved as .csv, macintosh.csv is saved as 'Macintosh' .csv

Thanks for any help

Dani AI

Generated

Note from : the thread was closed in favor of a web-based editor, but these troubleshooting notes help when CSV files must still be exchanged between Windows Excel and Mac Excel.

The two most common causes are character-encoding mismatches and different line endings. Windows Excel often writes CSV in a Windows "ANSI" code page (CP1252 for Western locales) and uses CRLF line endings; older Mac Excel builds historically expected MacRoman or different line breaks. Manifestations include garbled accented characters, merged columns, or a file that “won’t open” when double-clicked.

Practical checks and fixes that work on macOS / Unix-style systems:

  • View the file as plain text to see whether fields look correct and whether there is a BOM (byte-order mark).
  • Use the shell to detect and convert encoding/line endings. Example commands:
# show reported MIME/charset
file -I normal.csv

# convert CP1252 (Windows) -> UTF-8
iconv -f WINDOWS-1252 -t UTF-8 normal.csv > normal-utf8.csv

# remove CR characters (CRLF -> LF)
tr -d '\r' < normal-utf8.csv > normal-lf.csv

# or, if an older Mac Excel expects CR-only line breaks
perl -pe 's/\r\n/\r/g' normal-utf8.csv > normal-maclines.csv

If importing is still a problem, use Excel’s Import/Text wizard (File > Import or Data > From Text) rather than double-clicking: that lets the user explicitly pick the file origin/encoding and delimiter. When possible, exchange files in a Unicode form (UTF-8 with LF) or share an .xls/.xlsx copy to avoid CSV quirks. The web-based database approach chosen by is a robust long-term fix for cross-platform data editing.

Member Avatar for Member #380484

Thanks to all those that looked at this post.

I'm closing it now though since I detest Microsoft incompatibilities enough that I'm making a database interface similar to PHPMyAdmin (but user friendly) for my client, with JavaScript, PHP, and HTML Tables, for her to manage her product inventory.

Thanks again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.