Excel cannot open the file because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file

When we try to import template which is there in excel format I am getting below error.

Can anyone help me on this.
we recently upgraded PEGA 7.2 application to 8.7 in 7 there is no issue. but in 8 we are getting below erro.

“Excel cannot open the file because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file”

@KiranKumarLekkala

Please can you check your pr_engineclasses table to see the versions of the jars loaded?

Export to excel from Report is failing

[Video]: Tips for troubleshooting Export to Excel issues

In order to narrow down the issue, can you verify the OOTB behaviour of your initial export, to do so follow the below steps:

  1. Navigate to Application → Profile → Specifications

  2. If there are no existins specifications, create one for testing.

  3. Under actions, there is an option to export to excel, perform it

Validate the behaviour of this excel and let us know the outcome.

Please can you consult the Pega 8.8 documentation Activities for integrating cases with Excel documents

@MarijeSchillern

Thank you for looking into this issue.

  1. in pr_engineclasses table I could see the versions poi-3.14.jar, and this one is for “Export to excel from Report”

but we are not exporting from report, We added template in binary file and downloading it.

I observed one thing, when I ran the activity (which we configure to download excel) from dev studio standalone i am not facing this issue.

2 video is not playing, getting error

(This video didn’t load correctly. Refresh page to view.

Error Code: PLAYER_ERR_TIMEOUT

Session ID: 2023-10-19:7e8c54f98022ed4af6303210 Player Element ID: vjs_video_3)

3 Export to Excel is greyed out.

What do I need to to now? please suggest.

when I click on import from excel there is option to download template and I clicked on it and I was able to open excel without any issue.

@KiranKumarLekkala I am able to play the video - are you logged into your Pega community account? Could you try on another browser?

You’re confirming that the OOTB functionality is working fine?

Regarding your issue, as you appear to be using something customized, could I please ask that you log a support incident on the MSP so that our support team can help you further?

Please provide the INC id here so that I can help track progress.

@MarijeSchillern

Not sure whether this is causing OOTB rules are the section from where we are calling.

Okay, I will ask to raise SR, If we could not fix.

Thanks,

Kiran Kumar.

@MarijeSchillern

INC-A21314 raised.

@KiranKumarLekkala The support ticket INC-A21314 was closed with the following investigation:

Issue Description:

The client builds the logic to generate the Excel file and attempts to download it.Unfortunately, the file cannot be opened because it is corrupted and shows the below exception after being fully downloaded.

“Excel cannot open the file because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file”

Other actions to load the entire harness window with a new pop and run the Excel generation logic at the same time to download the harness content but those content aren’t supported by Excel.


Root Cause: Custom Rule

Explanation :
Implemented the action level change from other actions, used the opennewurl window and called the generate Excel with class name to resolve the issue.