Posted: 2 Feb 2015 8:57 EST Last activity: 4 Oct 2018 11:08 EDT
Unable to call export to excel activity on the click of button . The standalone activity works fine.
When I standalone run the activity to export the records in an excel it works fine. But on the click of button in a section when I call this activity nothing happens. I checked the tracer, the activity is getting called but the excel popup does not show up.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
If your are configuring the button action with run activity and having show-harness in that run activity will not return any results.Either you should use Show-Harness with acitivity name and harness name or "Open URL In Window"
Please provide the screenshots that how you have configured the button, So that we will get more idea on that.
Note: Button actions "Run Activity" will supress the results from the activity.
i exactly did what the above screenshot is showing. However, the activity is not getting called at all. Instead the submit button is refreshing the current section only. please advice on what needs to be done to call the activity :(
Can you explain indetail because it is not working fine.
I have my results in ContactsList.pxResultspage. I changed your code as you mentioned(just replaced page name) & stored the HTML rule created into a property and used that property as a parameter for ExportToExcel activity.But it is not working.I thing there is a problem with HTML code.
Would you please help me in Exporting the date in ContactsList.pxResultspage in clipboard to Excel sheet.I tried with the above code by changing the results page & it is not working.Will you explain me in detail if I'm missing anything.
First I browsed the data into ContactsList page of type Code-Pega-List by Obj-Browse method.Later I used ContactsList.pxResults in the above HTML code.I haven't declared ContactsList.pxResults in the Pages and Class tab of HTML Stream rule.Thats all I did.
I have a grid data in a section and there I have placed a link. On click of that link, I need to run an activity and perform some business logic. If all are fine then I need to export the grid data into Excel.
If there are any error observed ib business logic, then i shd not allow the system to pop-up the screen to download excel file.
FAFileName: "TestExcel.xlsx" (Any name that you want to have for the downlaoded document).
TemplateRFB: You will have to upload a sample excel template with columns mapped to clipboard properties like a binary file. While creating binary file you will enter App Name as webwb, FileName as your choice, Extension as xlsx.
So this parameter finally be like "webwb!YourTemplateName!xlsx"
Thanks for your solution approach. It worked. But what i am looking for is some generalized approach. Like i have a customer search screen which has multiple repeat grids. The requirement is to have export to excel functionality for each of the grids. Now if i need to create HTML streams for every section, it would be very poor coding and as well as would take much effort.
There would be different report definitions for each section and so would be different columns/properties for each grid. So can you please help me with this?
step 1: have a report defn or an activity where you form the list containing the results
step 2: in a section use repeat grid and as source use the report defn or the Page List.
step 3: create a html stream rule ( That will specify which columns you want to have in the excel. Get the values from the Pagelist you are using. For the format you can use the one that Raghu has specified.)
step 4: Create an activity (Step 1: Property-Set-HTML Step 2: Call ExportToExcel (OOTB) or your customized activity if you want to change anything)
step 5: in the section where you used the repeat grid, add a button, on click open url in new window , specify the activity name and window name
Step 1. On button Click add action Open URL in Window
Check Use Page Put Activity Name (e.g. TestDataExcel )and then Window Name(e.g. TextExtract)
Step 2. Now set parameter Param.pyReportName(Report Definition Name), Param.pyReportClass(Report Definition Class), Param.pyPageName(ResultPage). Please define Report Result Page in pages and classes as Code-Pega-List and pxResults as the class of your report definition class.