DataSet导出到Excel比较完整的解决方案(一)--客户端生成文件(downmoon)
2009-01-16 10:19:16 来源:WEB开发网核心提示: 可惜, 生成的倒是XML格式了,DataSet导出到Excel比较完整的解决方案(一)--客户端生成文件(downmoon)(4),但还是上传格式不正确,考虑到客户端可能是Excel2007/2003-97等等,决定放弃保存Excel到客户端的方式,第三种尝试方案:用cvs保存
可惜, 生成的倒是XML格式了,但还是上传格式不正确,考虑到客户端可能是Excel2007/2003-97等等,决定放弃保存Excel到客户端的方式。
第三种尝试方案:用cvs保存,将第一种方法改为:
ExportToCVS
Response.ContentType = "text/csv";//"application/vnd.ms-excel";
Response.AppendHeader("Content-Disposition", "attachment;filename=" + fileName + ".cvs");
生成格式大致如下:
CVS格式
"品名","最高价格","最低价格","平均价格","计量单位","备注"
"青菜","","","","元/公斤",""
"南瓜","","","","元/公斤",""
"瓠子","","","","元/公斤",""
"冬春笋","","","","元/公斤",""
"雪里蕻","","","","元/公斤",""
"樱桃萝卜","","","","元/公斤",""
"佛手瓜","","","","元/公斤",""
"白菜鼎","","","","元/公斤",""
"蒜","","","","元/公斤",""
"食用菌","","","","元/公斤",""
"黄瓜","","","","元/公斤",""
[]
- ››Excel 2010:用数据透视表对数据立体化分析
- ››Excel 2010:数据分析透视图的用法
- ››Excel 2010:简洁实用的迷你图
- ››Excel 2010:快速分析数据之数据条
- ››Excel 2010:快速创建丰富的数据图表
- ››Excel 2010:动态洞察数据的切片器
- ››Excel 2010:使用数据透视表对数据进行立体化分析...
- ››Excel 2010:将数据分析结果分页显示
- ››Excel 2010:数据分析透视图
- ››Excel 2010:快速分析数据之图标集
- ››Excel 2010:快速标注数据表中的前3名数据
- ››Excel 2010:便捷的打印工作表选项
更多精彩
赞助商链接