Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
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
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-03/3efcaba8-d4aa-490f-a489-fb6cbf28654c.jpg?h=f310b0d6&itok=JJS6L2Tq)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-03/3efcaba8-d4aa-490f-a489-fb6cbf28654c.jpg?h=f310b0d6&itok=JJS6L2Tq)
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.
![](https://accounts.pega.com/sites/default/files/pega-user-image/35/REG-34624.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/35/REG-34624.png?source=PUMINIT)
Pegasystems Inc.
GB
Where is the Template File Stored in PRPC ? As a 'Rule-File-Binary' instance for example ?
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Wipro
US
The template is stored in in the 'Excel' directory with the file type 'xlsx'
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
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
![](https://accounts.pega.com/sites/default/files/pega-user-image/35/REG-34624.png?source=PUMINIT)
![](https://accounts.pega.com/sites/default/files/pega-user-image/35/REG-34624.png?source=PUMINIT)
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
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Wipro
US
Thanks John. will try as you mentioned
Accepted Solution
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-03/3efcaba8-d4aa-490f-a489-fb6cbf28654c.jpg?h=f310b0d6&itok=JJS6L2Tq)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-03/3efcaba8-d4aa-490f-a489-fb6cbf28654c.jpg?h=f310b0d6&itok=JJS6L2Tq)
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
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
srcLogic
US
The OOTB activity that tsatish mentioned worked for me!