We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to export grid data in ASP.Net to an excel sheet

I would like som help getting started with aspose.cells.
I am working in visual studio 2015 and .net framework 4.6

What i have is a ASP.Net webform, where user can input SQL, and the data can be presented in a gridview.
Now the users would like to save the data in a excel sheet. and download them as excel.


There used to be an exportgridview.dll but need help with the syntax. …
Is it stil working ?

I can also create a worksheet in Aspose.Cell
But how can send the output file for the user to download it.

Advice on method and some syntax, would be really helpfull

regards Thomas


Thanks for your query.

Well, you may try to use Cells.ImportGridView method to import GridView data into MS Excel spreadsheet, see the document for your reference:

Regarding your query to send to output file in the browser, you may send it directly to a client browser via Response object to allow the user to either download it or save to the disk, see the document for your reference:

Thank you.


Thank you for the reply.

I still have trouble saving the content of a gridweb to a downloadable file from an ASP.Net-page

My gridweb in inside a update panel , i.e. the webform is build with ajax call,.
So the response options doesn’t work.
And the controls of the gridweb, and save button is also not working. And neither is the right clicking possiblities

I read, that the aspose gridweb do work with ajax, but I cant find any guidelines for how to do it.

Regards Thomas

      <!--Excel  Results -->
             <asp:UpdatePanel ID="UpdatePanelExcel" runat="server" UpdateMode="Conditional">
                    <asp:UpdateProgress ID="UpdateProgressExcel" runat="server" DisplayAfter="300" DynamicLayout="true">
                            <img src="Images/ajax-loader-bar2.gif" />
                            <br />
                            data loading .. please wait
                            <!-- http://ajaxload.info/ -->
                      <cc1:GridWeb ID="GW_Excel" runat="server"   ShowLoading="true"  ViewPanelScrollTop="true"   Enabled ="true" Visible="true" XhtmlMode="True" EnableAJAX="true" OnSaveCommand="GW_Excel_SaveCommand" OnSubmitCommand="GW_Excel_SubmitCommand"></cc1:GridWeb>
                    <asp:AsyncPostBackTrigger ControlID="navSubmit" />


Please see the thread for your reference:

If you still find the issue, kindly do create a simple sample project (runnable) with latest version of Aspose.Cells.GridWeb v17.8 with its resource files, zip it and post us here to show the issue, we will check it soon.

Thank you.