Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

csv attachments

There does not seem to be a separate category for the Mail app that is included with Mac OS.


There was an earlier thread on this but it is archived.


When I attached csv files to an email - and send it to folsk on windows - the file gets extra lines inserted - this causes problems for them processing the file.


The file is NOT created by Excel - but it is read into Excel - so changing the way the file is saved is not an possibility - and opening each file just to save it with different format is also not an option as the number of files to be processed makes that too time consuming.


Mail is doing something to the file that it likely does not need to be doing. If I attached the exact same file to a Mac Mail email and also to an email sent from a different email client - and open them both on Windows from Outlook - the Mac Mail file has extra lines and the other does not.


Yes I could remove the extension - or compress - or use a file sharing option instead of email attachment - the trouble is that there are many other folks involved in the process and it may be too difficult to change too much of the process.


Short term - I will simply not use the Mail client included with Mac OS X.

MacBook Pro, Mac OS X (10.7.3), iPhone 4s 64GB iPad 16GB

Posted on Mar 6, 2012 4:03 PM

Reply
10 replies

Mar 6, 2012 4:20 PM in response to Matt Wolanski

Slight update - the issue here may be more on the Outlook side - or both Apple's Mail and Microsoft's Outlook may be to blame. It does remind me of issues such as MIME encoding and .dat that seems only to occur on Outlook - almost like they make it so painful to use anything other than Outllook to talk to anyone using Outlook that everyone will just default to it to save from having to explain to the Outlook user (who likely has no choice) that they have lousy software and ought to change.


When I open the same sent file form Apple Mail and use a client other than Outlook to download/open the file - there is no issue - when I use an email client other than Apple Mail (and I did not test a vast array of clients, just a not-Apple client) to open the file then there is no issue on the Outlook side.


In other words -

from Apple Mail to MS Outlook = bad

from webmail to MS Outlook = okay

from Apple Mail to webmail = okay

from webmail to webmail = okay

Mar 6, 2012 6:26 PM in response to Matt Wolanski

Matt Wolanski wrote:


they make it so painful to use anything other than Outllook to talk to anyone using Outlook that everyone will just default to it to save from having to explain to the Outlook user (who likely has no choice) that they have lousy software and ought to change.



<insert evil laugh here>


from Apple Mail to MS Outlook = bad


It may be more complicated than that. Is this Outlook or Outlook Express? Is it Outlook 2003, 2007, or 2010? They all have their own distinctive set of bugs.


I did a test and see that Apple Mail is using a text encoding for CSV files. There is nothing wrong with that but I can totally see Outlook getting confused. Maybe zip the file before sending or convert it to XLS. The recipient is going to do that anyway.

Mar 7, 2012 5:02 AM in response to etresoft

Outlook 2007 is what I have tested with - the other end might be 2003, 2007 or 2010 on the windows side - and 2011 on hte Mac side.


Yes send windows attachemnt was checked and makes no difference.


Yes zip is an option.

Opening and saving each file in xls format is an option - however, I would have to do that operation at least a dozen times a day - which coudl get annoying - maybe a folder action setup to open each csv and resave it as an xls automatically might work.


The output file that I send gets copied and pasted into another doc - and then is not needed - so the extra work involved in converting the csv in advance seems inefficient.


Not using email to share the files might be an option.


For the moment the simplest option is for me to NOT use Apple Mail to send - or to instruct the folks on the other end to NOT use Outlook to receive.


Over the past decade or so I have created about 12,000 csv files - and while that is only about 1,200 a year or an average of about 5 a day - i am not the only one creating them and there is more than one person on the team that needs to process the files. So I am looking for the simplest - easiest - most comprehensive solution.


This was not a problem in the past because we all used Windows OS and MS Office Professional - a number of us have recently switched to Mac OS and not using MS Office (or at least not using Outlook).

Mar 20, 2012 5:26 PM in response to Matt Wolanski

The solution turns out (at least for me for now) to be an automator folder action with shell script where the shel script looks like this:

for f in "$@"

do

sed 's/'$'\r''$//' "$f" > "$f.new" && mv "$f.new" "$f"

echo $f >> csvlog.txt

done


which should replace the carriage return at the end of each line - leaving the line feed


or something like this

for f in "$@"

do

tr -d '\r' < "$f" > "$f.new"

mv "$f.new" "$f"

done



they both seem to work.


for other uses the substitution may need to be different.

csv attachments

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.