how to skip the file download wizard using GridExcelExport

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.


1 Reply

RR Ranjithkumar R G Syncfusion Team 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.


Loader.
Up arrow icon