Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Export datagrid to Excel with a lot of rows

Reply
Thread Tools

Export datagrid to Excel with a lot of rows

 
 
bnob
Guest
Posts: n/a
 
      07-28-2006
Hello

Here's my code to export a datagrid to Exel :
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Dim monStringWriter As StringWriter = New StringWriter
Dim monHtmlTextWriter As HtmlTextWriter = New
HtmlTextWriter(monStringWriter)
monDG.RenderControl(monHtmlTextWriter)
Response.Write(monStringWriter.ToString())
Response.End()

It's work perfectly, but when my datagrid displays for exeample 10000 rows,
the export doesn't work.
Instead I have the page impossible to display !!!!

Any idea ?






 
Reply With Quote
 
 
 
 
Winista
Guest
Posts: n/a
 
      07-28-2006
Try this way...

http://www.netomatix.com/gridexporttocsv.aspx

"bnob" <> wrote in message
news:%...
> Hello
>
> Here's my code to export a datagrid to Exel :
> Response.Clear()
> Response.Buffer = True
> Response.ContentType = "application/vnd.ms-excel"
> Response.Charset = ""
> Dim monStringWriter As StringWriter = New StringWriter
> Dim monHtmlTextWriter As HtmlTextWriter = New
> HtmlTextWriter(monStringWriter)
> monDG.RenderControl(monHtmlTextWriter)
> Response.Write(monStringWriter.ToString())
> Response.End()
>
> It's work perfectly, but when my datagrid displays for exeample 10000
> rows,
> the export doesn't work.
> Instead I have the page impossible to display !!!!
>
> Any idea ?
>
>
>
>
>
>



 
Reply With Quote
 
 
 
 
Amirallia
Guest
Posts: n/a
 
      07-31-2006
Winista a formulé ce vendredi :
> Try this way...
>
> http://www.netomatix.com/gridexporttocsv.aspx
>
> "bnob" <> wrote in message
> news:%...
>> Hello
>>
>> Here's my code to export a datagrid to Exel :
>> Response.Clear()
>> Response.Buffer = True
>> Response.ContentType = "application/vnd.ms-excel"
>> Response.Charset = ""
>> Dim monStringWriter As StringWriter = New StringWriter
>> Dim monHtmlTextWriter As HtmlTextWriter = New
>> HtmlTextWriter(monStringWriter)
>> monDG.RenderControl(monHtmlTextWriter)
>> Response.Write(monStringWriter.ToString())
>> Response.End()
>>
>> It's work perfectly, but when my datagrid displays for exeample 10000 rows,
>> the export doesn't work.
>> Instead I have the page impossible to display !!!!
>>
>> Any idea ?
>>
>>
>>
>>
>>
>>


It doesn't work....

No file is created to the server... It' directely display a white page
!!!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export datagrid to Excel with a lot of rows Amirallia ASP .Net 5 08-02-2006 06:43 AM
Export datagrid with a lot of rows to Excel bnob ASP .Net Datagrid Control 0 07-28-2006 06:19 PM
how can I export ALL datagrid rows to excel? The Colonel ASP .Net 5 10-03-2005 05:40 PM
export ALL datagrid rows to excel (not just current page)? The Colonel ASP .Net 1 09-28-2005 08:54 PM
Export to excel data from Datagrid rows sunilkumar Reddy via DotNetMonster.com ASP .Net 0 06-27-2005 12:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57