Question
Wipro
US
Last activity: 26 Sep 2016 0:45 EDT
Download already uploaded excel template in a screen
Dear All
I have an excel template already uploaded into Pega . My requirement is to download the same excel template in one of my screens. Once I download the template I can update the template with data and use the OTB activity MSOParseExcelFile to upload the excel data onto my clipboard.
Can somebody explain how I can download the excel template onto my local drive? I tried to replicate the logic which is behind the Download file button in Binary file screen, but it is not working
Thanks in advance
***Updated by moderator: Lochan to add Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Optus
AU
Hello,
You can simply use the "Rule-File-Binary.downloadFile" OOTB actiivty to download any type of binary file by passing pzinskey of the binary file as parameter.
Pegasystems Inc.
GB
Where is the Template File Stored in PRPC ? As a 'Rule-File-Binary' instance for example ?
Wipro
US
The template is stored in in the 'Excel' directory with the file type 'xlsx'
EY
US
I am also having the similar issue. Can somebody give your thoughts. I am saving the template as Rule-File-Binary and not sure how to download the template in one of my screens
Pegasystems Inc.
GB
Here's a basic Activity I put together to show the principal of this - you will need to put in checks to ensure the OBJ-OPEN doesn't fail etc.
First here's the steps, params and Pages (I haven't expanded the steps here - see below for this).
Here's it running:
Here's a basic Activity I put together to show the principal of this - you will need to put in checks to ensure the OBJ-OPEN doesn't fail etc.
First here's the steps, params and Pages (I haven't expanded the steps here - see below for this).
Here's it running:
So here's the first two steps expanded:
The third step doesn't need expanding (nothing extra to show); and here's the Java Code from the Java Step.
(Note : see Code-Pega-PDF.View - which does a similar thing).
com.pega.pegarules.pub.util.Base64Util decoder=new com.pega.pegarules.pub.util.Base64Util();
byte[] byteArray = decoder.decodeToByteArray( filesourceb64 );
String result=tools.sendFile(byteArray,filename,false,null,true);
Hope this helps, Cheers John
Wipro
US
Thanks John. will try as you mentioned
Accepted Solution
Optus
AU
Hello,
You can simply use the "Rule-File-Binary.downloadFile" OOTB actiivty to download any type of binary file by passing pzinskey of the binary file as parameter.
-
Hemanth Guptha Pasupula Subba
srcLogic
US
The OOTB activity that tsatish mentioned worked for me!