EXT.NET 3.2 RELEASED! With Tablet Support!
We have been working hard and are happy to announce the release of Ext.NET 3.2. Click here for a full list of changes and make sure you visit our download page now to get the latest version.
Results 1 to 3 of 3

Thread: Exporting gridpanel content to excel

  1. #1
    Join Date
    Dec 2011

    Exporting gridpanel content to excel


    I've been struggling for hours trying to find a solution to this problem that i've come across :S, i have to export the content of a gridpanel to a excel file,
    this is supposed to be the function that does it :

    void exportarExcel()
            string attachment = "attachment; filename=Export.xls";
            Response.AddHeader("content-disposition", attachment);
            Response.ContentType = "application/ms-excel";
            System.IO.StringWriter sw = new System.IO.StringWriter();
            HtmlTextWriter htw = new HtmlTextWriter(sw);
    Then i got to my web form and run the app, when i click the button that exports to excel all i get is this error


    in case the image cannot be seen the error is this:

    Status Code: 200
    Status Text: BAD RESPONSE: Unexpected Token <
    Please help! :(
    Last edited by geoffrey.mcgill; Dec 13, 2011 at 9:48 PM. Reason: please use [CODE] tags

  2. #2
    Member plykkegaard's Avatar
    Join Date
    Feb 2009
    I assume you want the enduser to download an excel spreadsheet?

    Have a look a this sample

    Better yet is to call an httphandler

    rgds /Peter

  3. #3
    Join Date
    Dec 2011
    It worked out perfectly :D thx

Similar Threads

  1. Exporting Grid Data for Excel, CSV, XML, HTML, PDF [EXAMPLE Codes]
    By fatihunal in forum Examples and Extras
    Replies: 5
    Last Post: Sep 04, 2012, 11:41 PM
  2. [CLOSED] hide a field while exporting data to Excel
    By Fahd in forum 1.x Premium Help
    Replies: 4
    Last Post: Jun 20, 2012, 5:46 PM
  3. exporting to excel with gridfilters on
    By norphos in forum 1.x Help
    Replies: 0
    Last Post: Oct 18, 2011, 2:14 PM
  4. Replies: 0
    Last Post: Sep 05, 2011, 11:01 AM
  5. [CLOSED] Excel exporting issue
    By Pablo_Azevedo in forum 1.x Premium Help
    Replies: 9
    Last Post: Oct 20, 2010, 6:12 PM

Tags for this Thread

Posting Permissions