最近纵横四海asp.net从sql**库几个不同的表中导出在同一个Excel表格第1个回答:shdq8882012-04-27关注1.联查s

第1个回答:

shdq8882012-04-27关注1.联查sql语句:select*fromtable1a,table2bwherea.条件1=b.条件2将查询后生成的表格保存在一个网页中.2.导出excel在生成的页面头部加入语句:<%response.ContentType="application/vnd.ms-excel"Response.AddHeader"content-disposition","inline;filename=你要导出的excel文件名.xls"%>3.从其他页加入按钮或链接调用此网页,即可.