Home All Groups Group Topic Archive Search About
Author
17 Mar 2006 5:40 PM
Kenny M.
Hi I'm using the code shown here to export only my DataGrid to Excel.
This 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.

Author
19 Mar 2006 3:34 PM
CaffieneRush@gmail.com
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?
Author
20 Mar 2006 3:01 PM
Kenny M.
Well, in my case the DataGrid has about 20 rows only.

So I still dont know!!



--
Kenny M.


Show quoteHide quote
"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?
>
>