I am having trouble opening csv
files correctly in Microsoft Excel for Mac 2011, Version 14.1.0
. The files will open but the dialog box to set the delimiter as a comma does not come up and thus all the columns are concatenated with commas. Is there a way to get Excel to recognize the comma delimiter?
Open a blank worksheet in Excel for Mac. From the main menu select: Data>Get External Data>Import Text File... From the Text Import Wizard (Step 1 of 3) select to open the file as Delimited and click Next. On (Step 2 of 3) set the Delimiters as: Semicolon and Comma with Text qualifier: as “ and click Next.
The strength of CSV files is that it is accessible everywhere, no matter the platform you're on – Windows, Mac, or Linux. Any spreadsheet application can access the contents of CSV files without any hiccups since the data is stored in plain text.
The trick is that you have to create a new workbook and then import the CSV file (i.e., via File / Import). In the CSV import dialog you can select things like the delimiter, encoding, etc.; whereas, you don't have the option of setting the delimiter character, etc. if you just open the existing CSV file directly.
This is also discussed here: https://apple.stackexchange.com/questions/23220/how-to-open-csv-file-with-microsoft-excel
One way is to insert sep=yourdelimiter in the begining of the file.
If you generate the csv in PHP: fwrite($fileHandle, 'sep=yourdelimiter' . "\r\n");
Otherwise you can open your csv with a text editor and add sep=yourdelimiter to the begining of the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With