将数据从Datagrid导出到Excel [英] Export Data from Datagrid to Excel
本文介绍了将数据从Datagrid导出到Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Session中有一个dataTable。单击模态对话框窗口中的按钮,我需要将此dataTable导出到Excel工作表。我怎么能这样做... ??
i尝试使用window.open(''Excel.aspx'','''','''','''')点击按钮和在Excel.aspx的页面加载中编写了导出代码。但是我的会话被清除了。在dataTable中没有数据。
i不想使用查询字符串...
在此先感谢,
Blacky
I have a dataTable in Session.On the click of a button in a Modal Dialog window I need to export this dataTable to Excel sheet.How could i do this...??
i tried using a window.open(''Excel.aspx'','''','''','''') in the onclick of the button And wrote the code for export in the page load of Excel.aspx .But my session gets cleared.There are no datas in the dataTable.
i dont want to use query string...
Thanks in Advance,
Blacky
推荐答案
hi,
>
我在Session中有一个dataTable。点击模态对话窗口中的按钮,我需要将这个dataTable导出到Excel工作表。我怎么能这样做...... ??
i尝试在按钮的onclick中使用window.open(''Excel.aspx'','''','''','''')并在Excel的页面加载中编写导出代码。 aspx。但是我的会话被清除了。有n o dataTable中的数据。
i不想使用查询字符串...
先谢谢,
Blacky
I have a dataTable in Session.On the click of a button in a Modal Dialog window I need to export this dataTable to Excel sheet.How could i do this...??
i tried using a window.open(''Excel.aspx'','''','''','''') in the onclick of the button And wrote the code for export in the page load of Excel.aspx .But my session gets cleared.There are no datas in the dataTable.
i dont want to use query string...
Thanks in Advance,
Blacky
查看会话被清除的位置和原因。
Look into where and why your Session is getting cleared.
我正在使用gridview做同样的事情并找到了 dialogArguments"属性有用,如:
I am doing about the same thing with a gridview and found the "dialogArguments" property to be useful as in:
展开 | 选择 | Wrap | 行号
这篇关于将数据从Datagrid导出到Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文