# Trying to read excel file from email listener. Getting an error pzUnrecoqnizedFile error

**URL:** <https://forums.pega.com/t/trying-to-read-excel-file-from-email-listener-getting-an-error-pzunrecoqnizedfile-error/8527>\
**Category:** General\
**Tags:** insurance, dev-designer-studio, pega-infinity, pega-academy, system-architect\
**Created:** [October 28, 2024, 9:01am UTC](https://forums.pega.com/t/trying-to-read-excel-file-from-email-listener-getting-an-error-pzunrecoqnizedfile-error/8527 "2024-10-28T09:01:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KishoreR7037](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@KishoreR7037](https://forums.pega.com/u/KishoreR7037)\
**Post date:** [October 28, 2024, 9:01am UTC](https://forums.pega.com/t/trying-to-read-excel-file-from-email-listener-getting-an-error-pzunrecoqnizedfile-error/8527/1 "2024-10-28T09:01:37Z")

</div>

We are trying to parse excel file using pzParseExcelFile.

From this activity we are trying to update java step 23,

If we try to replace byte bytes = myAttachStream.getBytes();

We are getting a error while checking in

Error: USING\_PAGE\_ERR:Using page was not found. Please try again.

---

<div class="post-metadata">

**Author:** ![Sairohith](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sairohith/32/22323_2.png) [@Sairohith](https://forums.pega.com/u/Sairohith)\
**Post date:** [March 15, 2026, 2:33am UTC](https://forums.pega.com/t/trying-to-read-excel-file-from-email-listener-getting-an-error-pzunrecoqnizedfile-error/8527/2 "2026-03-15T02:33:29Z")

</div>

The issue happens because `pzParseExcelFile` expects the attachment content to be passed correctly as a byte stream, and changing the Java step directly is breaking the activity context. Keep the standard attachment handling as it is and make sure the Excel file is first loaded into the correct clipboard page or parameter that the activity uses before calling `pzParseExcelFile`. The `USING_PAGE_ERR` means the Java step is trying to use a page that is not available in that activity step. So the fix is to restore the original logic, pass the attachment through the expected parameter or page, and avoid editing the internal Java step in the rule. Once the file is available on the proper page, `pzParseExcelFile` will be able to read it without the `pzUnrecognizedFile` error.

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/22727_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [March 15, 2026, 4:41pm UTC](https://forums.pega.com/t/trying-to-read-excel-file-from-email-listener-getting-an-error-pzunrecoqnizedfile-error/8527/3 "2026-03-15T16:41:10Z")

</div>

This is because system is not able to find the file. First store the file in service export directory, then use pxParseExcelFile activity to parse the file.

> [@Import Excel data to case (and show them in Constellation UI)](https://forums.pega.com/t/import-excel-data-to-case-and-show-them-in-constellation-ui/9900):
>
> This knowledge sharing article shows step-by-step configurations of how to upload an Excel file, parse the Excel data, and display them in a table using Constellation UI. Pega platform version used: 24.2.2 Configurations Step 1 - Create a data model. We created an Employee data object and the related fields. Step 2 - Create an Excel template file (.xlsx) and the corresponding Binary File rule. Notice the .pxResults() notation to import more than one record and the keyword “input”…

In this post you will see the file being pushed to service export directory using pxCreateFile and then parsed.
