php ajax 异步请求生成excel

我现在的需求是点击按钮 我选择需要生成的字段,让回回传后台,怎么生成不了excel
直接生成我用一个页面测试了下 可以<?php
require_once '../CommonClass/ClientScriptString.php';
require_once '../CommonClass/Global.php';
$xlsname = date('ymdhis');
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition:filename=$xlsname.xls");
//订单生成excel异步请求
$filed=$_REQUEST["filed"];

echo $filed;
echo utog("你好")."\t";
echo "b"."\t";
echo "b"."\t";
echo "d$xlsname"."\t";
echo "\n";

?>

 但是我现在获取的$_REQUEST["filed"];
是异步传输过来的 然后echo生成不了excel

作者: shenyong985873401   发布时间: 2011-05-12

也是生成了的,只是你是直接输出的,EXCEL生成后没有被客户端正确解析对,因为你是用AJAX请求的,建立修改PHP程序

作者: xkdxiaocainiao   发布时间: 2011-05-19