How to Export MultiPage DataGrid to Excel File

Discussion in 'ASP .Net Web Controls' started by Wael Nofal, Nov 11, 2004.

  1. Wael Nofal

    Wael Nofal Guest

    i exported the datagrid to excel file with this code:

    private void ibtnExcel_Click(object sender,
    System.Web.UI.ImageClickEventArgs e)
    {
    Response.Clear();
    Response.Buffer= true;
    Response.ContentType = "application/vnd.ms-excel";
    Response.Charset = "";
    this.EnableViewState = false;
    System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
    System.Web.UI.HtmlTextWriter oHtmlTextWriter = new
    System.Web.UI.HtmlTextWriter(oStringWriter);
    ActiveRequestsGrid1.RenderControl(oHtmlTextWriter);
    Response.Write(oStringWriter.ToString());
    Response.End();
    }
    but i'm not able to export multiple pages in the datagrid once at time,
    please reaply me.
    Wael Nofal, Nov 11, 2004
    #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. =?Utf-8?B?U3JpZGhhcg==?=

    using Microsoft Excel image for Export to Excel button

    =?Utf-8?B?U3JpZGhhcg==?=, Dec 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,086
    =?Utf-8?B?U3JpZGhhcg==?=
    Dec 9, 2005
  2. =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?=

    Export to Excel (Default File Type - Excel)

    =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?=, Apr 24, 2006, in forum: ASP .Net
    Replies:
    15
    Views:
    17,480
    syed hassan
    May 21, 2009
  3. Grey
    Replies:
    4
    Views:
    1,947
    Mark Rae [MVP]
    Oct 17, 2007
  4. Paul D. Fox

    Display a Datagrid & Export a Datagrid to Excel

    Paul D. Fox, Jul 21, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    211
    Elton Wang
    Jul 21, 2005
  5. Russ
    Replies:
    8
    Views:
    199
Loading...

Share This Page