Support Article
export to excel feature not working as expected
SA-15714
Summary
Export to Excel is not working (i.e. the excel file is not downloading).
User has configured a link with an action to call activity(ReportsExcelExport) but the file is not downloading.
Error Messages
NA
Steps to Reproduce
Create a link with run activity action to call ReportsExcelExport activity in asection.
Root Cause
A defect in Pegasystems’ code or rules written after 6.3 SP1.
Resolution
Perform the following local-change:
Instead of calling the activity on link, call Run script.
- Include the below javascript function in the harness.
form.id = "formExportViewToExcel";
form.method = "POST";
form.target = "_target";
document.body.appendChild(form);
var frm = document.forms["formExportViewToExcel"];
if(pega.env.ua.webkit && !window.chrome){
if(document.getElementById("loadFusionExportJS")==null)frm.target="";
}
var strActionSF = SafeURL_createFromURL(pega.u.d.url);
strActionSF.put("pyActivity", "ReportsExcelExport");
strActionSF.put("pxObjClass", "Rule-Obj-Activity");
strActionSF.put("pyClassName", "Data-Portal");
strActionSF.put("ViewClass", viewClass);
strActionSF.put("ViewPurpose", viewPurpose);
strActionSF.put("exportmode", "excel" );
frm.action = strActionSF.toURL();
frm.submit();
document.body.removeChild(form);
- Configure Run Script action on the link to call the above function and pass the revlevant parameters.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.