I've created a function for quickly generating CSV files that work with Microsoft applications. In the field I learned a few things about generating CSVs that are not always obvious. First, since PHP is generally *nix-based, it makes sense that the line endings are always n instead of rn. However, certain Microsoft programs (I'm looking at you, Access 97), will fail to recognize the CSV properly unless each line ends with rn. So this function changes the line endings accordingly.
http://codango.com/php-code-to-write-to-a-csv-file-for-microsoft-applications/
I am happy to share this resource that we found. The content displayed on this page is property of its original author or their organization.
No comments:
Post a Comment