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")
|
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.