Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Instead of your num2alpha(), consider using PHPExcel's built-in PHPExcel_Cell::stringFromColumnIndex() method Commented Apr 26, 2014 at 16:50
  • But why are you setting the delimiter for a CSV to ''? and the enclosure to ''..... this is the likely cause of your problem: if you have to change the delimiter, at least change it to a valid character like a "\t" that will still be recognised when the generated file is loaded into MS Excel Commented Apr 26, 2014 at 16:52
  • Changed it to "\t", see edit. This is how it looks. In one cell. I want it to put id in one column and title in another. dropbox.com/s/y9fk125v1z34gzs/howitlooks.png Commented Apr 26, 2014 at 17:10
  • I really can't understand what your reader is doing: you're generating a perfectly valid CSV file (if you open it in a text editor, you can see for yourself), but Excel is simply failing to read it correctly.... as you're using PHPExcel, have you tried using the Excel5 or Excel2007 Writers instead of CSV? Commented Apr 26, 2014 at 17:20