[php]An example of excel output

2016-2-18 写技术

<?php
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=Export_test.xls");
$tab="\t"; $br="\n";

$head="NO.".$tab."Message".$br; 
echo $head.$br;

echo  "test321318312".$tab; 
echo  "string1";
echo  $br;
  
echo  "330181199006061234".$tab;
echo  "number";
echo  $br;
  
echo  "=\"330181199006061234\"".$tab;
echo  "string2";
echo  $br;
?>

标签: php

发表评论:

Powered by anycle 湘ICP备15001973号-1