各位高手,我想做一个数据查询并导出数据到excel文件的功能,
先提交查询xml命令:
strXml+="<Search>";
strXml+="<Action>Enterprise</Action>";
strXml+="<Area>"+recOrgArea.value+"</Area>";
strXml+="<Status>"+recOrgStatus.value+"</Status>";
strXml+="</Search>";
objHTTP = new ActiveXObject("Msxml2.XMLHTTP");
objHTTP.open("POST","Rpt_ProcCommand.aspx",false);
objHTTP.send(strXml); 然后在Rpt_ProcCommand.aspx.cs文件中查询数据,并生成一个excel,然后再下载到客户端,这样的一个方式,该怎么写代码?
急!!!!!
先提交查询xml命令:
strXml+="<Search>";
strXml+="<Action>Enterprise</Action>";
strXml+="<Area>"+recOrgArea.value+"</Area>";
strXml+="<Status>"+recOrgStatus.value+"</Status>";
strXml+="</Search>";
objHTTP = new ActiveXObject("Msxml2.XMLHTTP");
objHTTP.open("POST","Rpt_ProcCommand.aspx",false);
objHTTP.send(strXml); 然后在Rpt_ProcCommand.aspx.cs文件中查询数据,并生成一个excel,然后再下载到客户端,这样的一个方式,该怎么写代码?
急!!!!!
解决方案 »
- 找高手解决问题
- 设计模式 中的观察者模式 里的 推跟拉 有什么区别?
- 谁做过这样的逻辑
- 难道没人懂接口了?????????
- 谢 realljx(至尊十三少-抵制日货(For ever)) 100分请进( 关于SESSION丢失问题的再次提问,散无比多分(500)就为了一个解决 )
- 请教关于WIN7 编写的WPF程序在XP上运行时,数据库的问题
- linq to ef入门困惑
- 菜鸟发问:web窗体中如何给“返回”按钮写代码?
- 老问题,不管各位大虾能否解决,请进来看看,在线等待。。。。谢谢。。。。。
- 怎样将两个dataset合并成一个
- 关于RadioButtonList 的 RepeatLayout
- 如何判断本次程序运行 是通过手动点击运行 还是通过注册表自动运行(C# WinForms)
打开EXCEL模版赋值或导出EXCEL使用XML
Response.ClearContent();
Response.BufferOutput = true;
Response.Charset = "utf-8";
Response.ContentType = "text/xml";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AppendHeader("Content-Disposition", "attachment;filename="+Server.UrlEncode("test")+".xls");