, CVS MS excel.
:
However, certain Microsoft programs (I'm looking at you, Access 97),
will fail to recognize the CSV properly unless each line ends with \r\n.
:
$td = array();
foreach( $element->find('td') as $row) {
$td[] = $row->plaintext;
}
fwrite($fp,implode(";",$td)."\r\n");
:
Secondly, if the first column heading / value of the CSV file begins with
`uppercase `ID, certain Microsoft programs (ahem, Excel 2007) will interpret
the file `as` being in the` SYLK format rather than CSV`
, ,... id,...
, "id" ";"
MS excel 2003.
:
UTF8.csv excel,
BOM .
PHP :
fwrite($fp,"\xEF\xBB\xBF");
...start writing
3 ( unicode) forces excel and the likes,
CSV AS utf8 , , .
, ,
; file.txt ( .txt, .csv),
excel, ; utf8 .
user1299518