这是检索数据并将其插入到 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 工作表中 阿拉伯语不可读
请有任何解决方案