Error when exporting Excel xlsx file

I am getting error when trying to export an Excel file. The xlsx file exported is corrupted. Please find bellow the Diagnostic Info and then the message contained inside the xlsx file.

Hi @mzrk
You should upgrade immediately to a newer release: https://github.com/metabase/metabase/security/advisories/GHSA-vmm4-cwrm-38rj

Make sure to make backup first. Make sure your RDS is decoupled from EB. You'll probably need to read the entire documentation, since you're upgrading from an old version:
https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-elastic-beanstalk.html#deploying-new-versions-of-metabase-on-elastic-beanstalk

The same thing happened to me and I discovered what happens when my query downloads a field that contains html code. If I avoid bringing that field, the xls is downloaded and opened without problems.

@luis.monge Almost for sure a different problem than what the OP reported.
But try posting "Diagnostic Info" from Admin > Troubleshooting, and the stacktrace error, and an example of HTML causing problems.