Nate Weiner

This is an old archived post from my former blog The Idea Shower. It's where I cataloged my product explorations and releases, one of which ultimately became Pocket.

This post was published back in 2008. It may not function as originally intended or may be missing images.

When Dynamically Generating CSV, Don't Forget the Quotes

January 22, 2008

I was generating CSV files with PHP so that a client could easily export their mailing list from the database when I hit a snag with loading the generated files on a Mac.

I received the error message:

"SYLK: file format is not valid." when opening the file in Excel on OS X.

To solve the problem, simply make sure all data is enclosed with quotes.

Ex: 'ID','First Name', 'Last Name'

Found this on Microsoft's website: