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.
Unfortunately, activation email could not send to your email. Please try again.

how to skip the file download wizard using GridExcelExport

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 12:15 AM

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.

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.

;