在单独的工作表中将多个网格视图转换为Excel。 [英] Converting Multiple Gridviews to Excel in separate sheets.

查看:79
本文介绍了在单独的工作表中将多个网格视图转换为Excel。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我的项目中有多个Gridview。我必须将我的所有gridviews导出到excel工作簿,但条件是每个gridview应导出到同一工作簿的单个工作表。

如下所示:



GridView1 = Sheet1

GridView2 = Sheet2

GridView(n)= Sheet(n)



等等。



只有一个gridview可见,其他的是在不同场景下动态创建的。



我已经搜索了所有内容,并找到了导出DataSet的结论,其中包含我的所有数据表..但是,我在Excel中需要的文本格式应该与GridView格式相同,如果我导出数据表,则数据中没有格式化Excel中。 (将行转换为一些gridviews的列,这些列应该导出为格式相同),这就是为什么将DataTables或DataSet导出到Excel对我的项目不成功的原因。


请帮我解决这个问题。



谢谢,

AR。

Hi All,

I have multiple Gridviews in my project. I have to export my all gridviews into excel workbook but the condition is that each gridview should be exported to single sheet of the same workbook.
Just like below:

GridView1 = Sheet1
GridView2 = Sheet2
GridView(n) = Sheet(n)

and so on.

Only one gridview is visible and the others are dynamically created on different scenarios.

I have googled everything and found the conclusion of exporting DataSet which contains all my datatables.. But, the text formatting I need in excel should be same as GridView formatting and if I export datatables, the data has no formatting in the excel. (Transposing Rows into Columns of some gridviews which should be exported as same as format is) that is why exporting DataTables or DataSet to Excel was unsuccessful for my project.

Please help me in this matter.

Thanks,
AR.

推荐答案

这篇关于在单独的工作表中将多个网格视图转换为Excel。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆