anonīms Posted April 30, 2013 Report Share Posted April 30, 2013 (edited) fputcsv($out, array('Vārds', 'Punkti', 'Izpildīts')); if($csv_data) { foreach($csv_data as $row) { $line = array(check_plain($row['name']), $row['points'],$row['added']); fputcsv($out, $line,chr(9)); } } kāda velna pēc atverot caur exceli man viss ir vienā čupā? (neatdalas pa tabiem (name,points,added)) + chr(9) ar nepalīdz ;[ header('Content-Encoding: UTF-8'); header('Content-type: text/csv; charset=UTF-8'); header('Content-Disposition: attachment; filename="'.date("d-m-Y_H:i") . '.csv'.'"'); Edited April 30, 2013 by anonīms Link to comment Share on other sites More sharing options...
Kasspars Posted April 30, 2013 Report Share Posted April 30, 2013 Tāpēc ka sexelis csv delimiteri ņem no taviem regional iestatījumiem un tur noteikt ir ielikts semikols ; Link to comment Share on other sites More sharing options...
anonīms Posted April 30, 2013 Author Report Share Posted April 30, 2013 (edited) yep. jau atkodu un steidzos te iekomentēt fputcsv($out, array('Vārds', 'Punkti', 'Izpildīts'),";"); if($csv_data) { foreach($csv_data as $row) { $line = array(check_plain($row['name']), $row['points'],$row['added']); fputcsv($out, $line,";"); } } Edited April 30, 2013 by anonīms Link to comment Share on other sites More sharing options...
Recommended Posts