使用制表符、换行符的方法  
制表符”\t”用户分割同一行中的列,换行符”\t\n”可以开启下一行。  
<?php   
header(”Content-Type: application/vnd.ms-execl”);   
header(”Content-Disposition: attachment; filename=myExcel.xls”);   
header(”Pragma: no-cache”);   
header(”Expires: 0″);   
/*first line*/   
echo “hello”.”\t”;   
echo “world”.”\t”;   
echo “\t\n”;   
   
/*start of second line*/   
echo “this is second line”.”\t”;   
echo “Hi,pretty girl”.”\t”;   
echo “\t\n”;   
?>  

相关文章:

  • 2022-03-05
  • 2022-12-23
  • 2021-12-05
  • 2021-12-31
  • 2021-12-30
  • 2021-08-18
  • 2021-10-04
  • 2021-12-15
猜你喜欢
  • 2021-12-05
  • 2021-12-05
  • 2021-11-23
  • 2021-11-23
  • 2021-12-15
相关资源
相似解决方案