net导出多SheetExcel客户端.docVIP

  • 4
  • 0
  • 约5.52千字
  • 约 5页
  • 2017-01-22 发布于重庆
  • 举报
net导出多SheetExcel客户端

把Microsoft.Office.Interop.Excel.dll 文件放到网站bin目录。 添加引用。 using Microsoft.Office.Interop.Excel; private void ExportExcel() ? ? { ? ? ? ? //根据该经销商有的产品分多少个Sheet ? ? ? ? string sql = select distinct a.Agent_Name,pinfo.Product_Name,count(1) from Product_Info as pinfo left join Agent_Info as a on (cast(pinfo.Card_ID as bigint) between cast(a.Start_CardID as bigint) and cast(a.End_CardID as bigint)) where a.Agent_Name=@Agent_Name group by ?a.Agent_Name,pinfo.Product_Name; ? ? ? ? DataTable outList = new DataTable(); ? ? ? ? if (selAgent.Value != -1) ? ? ? ? { ? ? ? ? ? ? SqlParameter sqlParams1 = new S

文档评论(0)

1亿VIP精品文档

相关文档