csvkit icon indicating copy to clipboard operation
csvkit copied to clipboard

Add command-line option to csvformat to set dialect for Excel compatibility

Open onyxfish opened this issue 14 years ago • 8 comments

Produces a CSV file which maximizes Excel compatibility. Uses the lessons learned here:

http://simonwillison.net/2008/Aug/20/excel/

onyxfish avatar Apr 13 '11 20:04 onyxfish

Should this be a standard flag instead of a tool. Need to think this through more.

onyxfish avatar Apr 20 '11 16:04 onyxfish

This should be a flag to csvformat. See #220.

onyxfish avatar Aug 19 '13 20:08 onyxfish

This is finally ready to be done now that csvformat exists.

onyxfish avatar Sep 01 '14 20:09 onyxfish

Blog post is no longer accessible (and it's not in Internet Archive). Excel for Mac throws a wrench into Excel compatibility. The variables I know of for better Excel support are:

  • tabs are usually better than spaces
  • sometimes a UTF-8 BOM is needed (but sometimes it makes things worse)
  • changing the encoding to Windows-1252 is typically best

jpmckinney avatar Jan 22 '16 22:01 jpmckinney

Ugh, bummer that this excel CSV reference is gone. I remember it being very useful. Pinging @simonw to see if he might have a backup copy?

onyxfish avatar Jan 23 '16 00:01 onyxfish

Is it this http://web.archive.org/web/20081120034559/http://simonwillison.net/2008/Aug/20/excel/ https://www.djangosnippets.org/snippets/993/ ?

paulfitz avatar Jan 23 '16 03:01 paulfitz

That looks like the one! Nice find @paulfitz!

onyxfish avatar Jan 23 '16 03:01 onyxfish

UTF-16, a byte order mark and tab-delimiters

jpmckinney avatar Jan 23 '16 15:01 jpmckinney

I opened some files in Excel today, and it seems to be okay now.

jpmckinney avatar Oct 17 '23 21:10 jpmckinney