asp.Net数据导出问题 急急急 导出成 csv 嘛,看你的格式也是 csv的格式撒或者在点击下载时判断行数,然后传递参数,比如起始行-结束行,开几个下载页面 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 直接说吧!导出到多个excel的多个sheet中。有什么难的? 导出多个sheet文件根据数据集部门添加多sheetExcel.Application app = new Excel.ApplicationClass(); app.Visible = true; Excel.Workbook workBook = app.Workbooks.Open(templetFile,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing); Excel.Worksheet workSheet = (Excel.Worksheet)workBook.Sheets.get_Item(1); for(int i=1;i <sheetCount;i++) { ((Excel.Worksheet)workBook.Worksheets.get_Item(i)).Copy(missing,workBook.Worksheets[i]); } 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(filename)+".xls"); Response.Write(@"\r\n<Workbook xmlns='urn:schemas-microsoft-com:office:spreadsheet' xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns:ss='urn:schemas-microsoft-com:office:spreadsheet' xmlns:html='http://www.w3.org/TR/REC-html40'>"); Response.Write(@"\r\n<DocumentProperties xmlns='urn:schemas-microsoft-com:office:office'>"); 大侠呀 我是真的看不明白 才毕业没有接触到这个 能不能在给我说说 是个什么思路呀 我返回的是一个datatable 数据太多了 怎么把他一次全部导出呢 在不同的sheet里面也行 VSTO Excel 取消注册函数异常 求代码:实现防火墙效果,禁止访问网络 急急急急!!!C# winform根据COMBOX内容名称得到名称编码 在线等 急 C# webbrowser frame内嵌iframe 一个关于double类型的奇怪疑问。 简单的控件命名的规范的问题 Excel导入SQLSERVER数据库,请问怎样杜绝导入表头那一行 各位大哥大姐帮帮忙 200分请教真正的高手①:方法的参数如何选择 C#WEB开发问题,如何引用别的C#文件的内容 泛型怎样转换为datatable datagridview上显示控件问题
根据数据集部门添加多sheet
Excel.Application app = new Excel.ApplicationClass();
app.Visible = true;
Excel.Workbook workBook = app.Workbooks.Open(templetFile,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing);
Excel.Worksheet workSheet = (Excel.Worksheet)workBook.Sheets.get_Item(1);
for(int i=1;i <sheetCount;i++)
{
((Excel.Worksheet)workBook.Worksheets.get_Item(i)).Copy(missing,workBook.Worksheets[i]);
}
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(filename)+".xls");
Response.Write(@"\r\n<Workbook xmlns='urn:schemas-microsoft-com:office:spreadsheet'
xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel'
xmlns:ss='urn:schemas-microsoft-com:office:spreadsheet' xmlns:html='http://www.w3.org/TR/REC-html40'>");
Response.Write(@"\r\n<DocumentProperties xmlns='urn:schemas-microsoft-com:office:office'>");