We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to skip the file download wizard using GridExcelExport

Thread ID:

Created:

Updated:

Platform:

Replies:

105931 Nov 28,2012 08:53 PM UTC Dec 5,2012 05:15 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Lee
Asked On November 28, 2012 08:53 PM UTC

I have a asp.net project that used GridGroupingControl. I would like to export the excel file to some folder directly.  here is piece of code.

protected void btnPublish_Click(object sender, EventArgs e)

{

string fileName = "Excel.xls";

GridExcelExport excel = new GridExcelExport(this.gridgroupingcontrol1, fileName, ConverterOptionsExt.All);

excel.ExportNestedTable = true;

excel.Export();

}

When I click that button, it will come with File Download wizard "Do you want to open or save this file" . I want to skip that step (no wizard) and save that file directly to our shared folder.  Please provide some suggestion.


Ranjithkumar R G [Syncfusion]
Replied On December 5, 2012 05:15 AM UTC

Hi Lee,

 

Thanks for using Syncfusion products.

 

We suggest you to save the exported excel file in server by setting SaveIn type while creating object for GridExcelExport class to achieve your requirement. Please refer to the code snippet below to achieve this.

 

 

    protected void Button1_Click(object sender, EventArgs e)

    {

 

        GridExcelExport excel = new GridExcelExport(this.GridGroupingControl1, @"C:\Sample.xlsx"SaveIn.Server);

        excel.ExportNestedTable = true;

        excel.Export();

 

    }

 

Please let us know if you have any concern.

 

Regards,

Ranjithkumar.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;