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.
Syncfusion Feedback

exportPivotGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

127670 Dec 1,2016 04:23 PM UTC Dec 2,2016 12:28 PM UTC JavaScript 1
loading
Tags: ejPivotGrid
Damion
Asked On December 1, 2016 04:23 PM UTC

Can someone explain the first parameter for the exportPivotGrid function for me please

Sastha Prathap Selvamoorthy [Syncfusion]
Replied On December 2, 2016 12:28 PM UTC

Hi Damion,   
   
Thank you for looking Syncfusion products.   
   
The first parameter of the ExportPivotGrid is an “URL” link (link is either online hosted link or local hosted service file) which contains the code to export the PivotGrid. Please find the sample to export PivotGrid using the “ExportPivotGrid”.   
 
Note: In the Exporting sample, we have provided the export link as window.baseurl + "api/PivotGrid/Olap/ExcelExport” “. The “window.baseurl”  indicates the source link hosted to IIS server from the ejservice path.   
 
So, you can provide your local service file or online link to export the PivotGrid. Please refer to the below sample code example.   
 
Local Link:   
if (exportOption == "excel")   
    pGridObj.exportPivotGrid(../api/PivotGrid/Olap/ExcelExport""fileName");   
   
Online Link:   
if (exportOption == "excel")   
    pGridObj.exportPivotGrid(http://js.syncfusion.com/demos/ejservices/api/PivotGrid/Olap/ExcelExport""fileName");   
  
Code contained in “../api/PivotGrid/Olap/ExcelExport” below:   
   
        [AcceptVerbs("Post")]   
        public void ExcelExport()   
        {   
            PivotGridExcelExport pGrid = new PivotGridExcelExport();   
            string args = HttpContext.Current.Request.Form.GetValues(0)[0];   
            pGrid.ExportToExcel(string.Empty, args, HttpContext.Current.Response);   
        }   
  
Regards,   
Sastha Prathap S.  


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

;