As part of implementation, we need to follow below steps to ensure that this issue is resolved.
1. Take the attachment key of the attachment created in pega (Data-WorkAttach-File) from the primary page’s attachment embedded page.

Here I have used a single upload type of property.
2. Using the attachment key open the object and get the pyAttachStream out of it.

3. We need to recreate the uploaded file in the service export directory again using the pyAttachStream content.
Rather using a Java step you can write this into a function and ensure that below steps are implemented,
- Get the service export path
- Check if the directory exists, if it does not exist, make a new one.
- Replace all the spaces in the pyAttachStream content.
- Get the decoded byte array out of the encoded pyAttchStream content.
- Using outputstream write the byte array to the file path
Your export file path should look something like below
file://web:/StaticContent/global/ServiceExport/DonorContent.xlsx

4. Once the file is written in the service export directory, set up the Param.FSFileName and Param.TemplateRFB as usual and go ahead with the parsing. Ensure to check the bDeleteFile option so that after successful parsing the file which we created will be deleted by pega automatically.

5. Overall, your activity should look something below. Apart from the regular implementation only Step 3, 4 are additional here.

6. Once we are done with the parsing ParsePage.pxResults should have all the rows parsed and mapped. From here you can continue with your regular implementation validating the content, copying it to an embedded page list and showing up as a table on the UI as shown below.
Excel Template

Uploading excel on the case

Uploaded Excel File content

Displaying the records on the UI in the next screen after successful parsing.
