0

i'm trying to create a CSV using this solution: Creating csv file with php

Something is wrong, i keep getting data stuffed into one cell like this:

enter image description here

each value should be in an own cell .. any ideas what's wrong? seems like the csv uses the wrong delimiter.

thanks

Community
  • 1
  • 1
Fuxi
  • 7,611
  • 25
  • 93
  • 139
  • It is working fine at my end. I opened file in Excel 2007. which version are you trying? Or, try to open this generated CSV to any other PC. May be some setting changed in your excel. – Apul Gupta Sep 20 '14 at 11:46

1 Answers1

1

I finally found the solution: seems like it doesn't work for the German version of Excel, all I had to do is changing the delimiter to a semi-colon like this:

fputcsv($fp, $val, ";");
Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
Fuxi
  • 7,611
  • 25
  • 93
  • 139
  • I remember a question being posted some time ago where it was the same problem. OP was using a German version of Excel. The issue was quickly resolved because the OP had posted that they were using a German version which made answering/solving the issue faster. – Funk Forty Niner Sep 20 '14 at 14:26