|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Exporting Datagrid to ExcelThis is the simplest way to export data to excel (changing the content type) the code is very short but unfortunately it not work well in every case. I don’t know why the DataGrid has not format at all and I'm filling it from a SqlDataReader http://www.c-sharpcorner.com/Code/2003/Sept/ExportASPNetDataGridToExcel.asp In my page I have two DropDownListBox, two Textboxes, two buttons and the DataGrid. Issue Number1 In this line: Response.End(); I receive an exception: the Subprocess has been terminated. Issue Number2 After I remove Response.End(); the Save/Open windows appear but when I open the Excel document I see the Textboxes and Buttons overlapped, but nothing about the DataGrid. Any Sug -- Kenny M. See the following code for exporting from a gridview to excel.
http://aspnet101.com/aspnet101/aspnet/codesample.aspx?code=gvExportExcel It looks like there is a limit to how many rows you can export (65536 rows). Are you exporting above this limit and causing the process to shut down? Well, in my case the DataGrid has about 20 rows only.
So I still dont know!! -- Show quoteHide quoteKenny M. "CaffieneR***@gmail.com" wrote: > See the following code for exporting from a gridview to excel. > http://aspnet101.com/aspnet101/aspnet/codesample.aspx?code=gvExportExcel > > It looks like there is a limit to how many rows you can export (65536 > rows). Are you exporting above this limit and causing the process to > shut down? > >
Are you sure? for delete in GridView
FormView vs create How to get CommandField and ButtonField in the toolbox? Binding TextBox DropDownlist problem paging control? GridView and DetailsView/FormView in seperate pages FormView sample that includes edit/delete? DataView, DataTable, or DataSet? Disable CommandField for some rows of data |
|||||||||||||||||||||||