Export datagrid with a lot of rows to Excel

Discussion in 'ASP .Net Datagrid Control' started by bnob, Jul 28, 2006.

  1. bnob

    bnob Guest

    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 ?
     
    bnob, Jul 28, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sunilkumar Reddy via DotNetMonster.com

    Export to excel data from Datagrid rows

    sunilkumar Reddy via DotNetMonster.com, Jun 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    666
    sunilkumar Reddy via DotNetMonster.com
    Jun 27, 2005
  2. The Colonel
    Replies:
    1
    Views:
    469
    The Colonel
    Sep 28, 2005
  3. The Colonel
    Replies:
    5
    Views:
    1,452
    The Colonel
    Oct 3, 2005
  4. bnob
    Replies:
    2
    Views:
    480
    Amirallia
    Jul 31, 2006
  5. Amirallia
    Replies:
    5
    Views:
    1,983
    Amirallia
    Aug 2, 2006
Loading...

Share This Page