-1

这是检索数据并将其插入到 excel 工作表中的代码

header( "Content-Type: application/vnd.ms-excel" );
header( "Content-Type: text/html; charset=ISO-8859-1" );
header('Content-Type:text/html; charset=UTF-8');
header( "Content-disposition: attachment; filename=spreadsheet.xls" );

$rs = mysql_query("select * from organizations");
while ($row = mysql_fetch_object($rs)) {

    echo $row->name1 . "\t" . $row->name2 . "\t" . $row->name3 ."\t" . $row->email . "\n";
}

($row->name1) 是阿拉伯语格式

问题出在 Excel 工作表中 阿拉伯语不可读

请有任何解决方案

4

1 回答 1

0

它们是一些用于读取 Microsoft Word/Excel 文件的第三方工具,但如前所述,最好导出为 CSV。

于 2013-05-29T12:28:29.490 回答