Friday, October 28, 2016

Parse Excel Using PRPC - OOTB

Parsing Excel sheet in Pega:

We are having default pega activities for parsing the excel. We will see how we need to implement it.

Steps for parsing the Excel Data:
1. Create a data class for which Data you wanted to store.
here in example wanted to Upload Employee Data, so Create a Class of EmployeeDetails and its properties.
2. Excel in which format you will be uploading the data, Template Excel need to Upload.
Sample excel format is given below.
Template need to uploaded in the path Technical-->Binary File.
Screen shot:


3. For Uploading the file, OOTB pega section is "pxFileUpload"  we can use. In any flow action we can call this flow action to get upload button.
"FilePath" is the Control Used.
Screen shot:

4. In the activity you need to call "MSOParseExcelFile" - activity which will parse the uploaded excel.
as paramter give the details as in the screen shot.
FSFileName: all file which are uplloaded by default it will store in this page"pxRequestor.pyFileUpload"
TemplateRFB: Template Name which u uploaded in the step - 2

5. Call this activity in the Post Activity of the Flow action.
Screen shot:




Then in  the Clipboard u will get as below page.



Now it will store the data as Julian Date.
If Date is there then we can mention the data in the YYYYMMDD format. (ex. 20160202)
And that property also can be mentioned as Text in the Pega, so it will parse in the same format, then in Pega Activity we can change to any format we needed.

No comments:

Post a Comment